3.7 KiB
3.7 KiB
URI Contract
This page defines the canonical resource URI contract, template parameter rules, and compatibility policy.
Canonical URI Surface
The public, preferred URIs are:
resource://catalog/skills_indexresource://catalog/skills/{skill_id}resource://skills/{skill_id}/documentresource://skills/{skill_id}/references/{ref_id}resource://docs/{path*}
Contract intent:
- Catalog URIs are discovery surfaces.
- Skill URIs are the primary per-skill guidance surfaces.
- The docs wildcard URI is a direct authored-markdown access surface under
docs/.
URI Semantics
resource://catalog/skills_index
- Returns a compact list of skill records for discovery.
- Contains one entry per
skill_id. - Includes enough metadata for client-side selection, at minimum
id,name,description,tags, andcapabilities.
resource://catalog/skills/{skill_id}
- Returns one normalized record for
skill_id. - Includes the canonical document URI and declared reference ids.
- Returns not found when
skill_iddoes not exist.
resource://skills/{skill_id}/document
- Returns the canonical
SKILL.mdauthored content for that skill. skill_idmust satisfy the stable skill id rules from the content contract.
resource://skills/{skill_id}/references/{ref_id}
- Returns one reference document declared in the skill frontmatter references manifest.
ref_idis the stable public handle for that reference document.
resource://docs/{path*}
- Returns authored markdown at a normalized relative path under
docs/. - Supports nested paths via RFC6570 wildcard expansion.
- Typical examples include
index.md,usage.md,skills/<skill-id>/SKILL.md, andskills/<skill-id>/references/<file>.md.
Template Parameter And Validation Rules
skill_id
- Lowercase kebab-case.
- Must satisfy the stable skill id rules from the content contract.
ref_id
- Lowercase kebab-case.
- Must be declared in the skill's references manifest.
path*
- Relative POSIX path only.
- No leading slash.
- No
..traversal segments. - Resolves only inside
docs/. - Markdown-only in the end state, meaning
.mdfiles.
URI Versioning Policy
Default rule:
- Keep URIs unversioned by default.
- Allow URI and payload updates when they improve clarity or implementation simplicity.
Breaking-change rule:
- Breaking changes use direct replacement of the canonical URI family.
- No compatibility aliases or dual URI families are maintained.
FastMCP version metadata usage:
- Resource
versionmetadata may be used for implementation and version discovery. - URI readability and maintainability remain the primary contract.
Reference Id Compatibility Policy
ref_id is the public identifier for a reference document, separate from file path.
Rules:
- Prefer keeping
ref_idstable when practical. - File paths may change without URI churn as long as the mapped
ref_idstill resolves. - If a reference is renamed, introduce a new
ref_idand treat the old one as retired. - Avoid reusing retired
ref_idvalues for unrelated content.
Invariants
This contract guarantees:
- One canonical URI pattern per core capability surface.
- Fast, low-friction URI evolution through direct replacement of canonical URIs.
- A single canonical catalog URI family with no alias maintenance overhead.
- Reference mappings can evolve with minimal churn.
Non-Goals
This contract does not define:
- Implementation-specific transform wiring details, such as
VersionFilter, mounts, or provider composition. - Migration script mechanics for auto-generating aliases.
- Authorization policy design for URI-level access control.