-
Notifications
You must be signed in to change notification settings - Fork 9
docs(resources): document static properties as a first-class MCP/OpenAPI schema source #605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
7fea797
6cfe041
556106b
10bc616
5f06e2b
cfdbab6
78b3df2
c35e4c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ The Resource's path is sanitized into a valid tool name: `/` and `.` become `_`. | |
|
|
||
| ### Input schema derivation | ||
|
|
||
| Input schemas come from `Table.attributes`: | ||
| Input schemas come from `Table.attributes` — or, for a programmatic Resource that declares no attributes, from its [`static properties`](/reference/v5/resources/resource-api#static-properties-recordstring-jsonschemafragment) <VersionBadge type="changed" version="v5.2.0" />, whose JSON Schema types pass through unchanged: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The bullets immediately below still say
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in c35e4c5, and you were right about the scope — it needed a third page. Verified against v5.2.6: every derivation call site in
Since the schema is caller-agnostic, each page now also says to treat attribute names and descriptions in a descriptor as visible to any authenticated caller who can see the tool. sent with Claude Opus 5 |
||
|
|
||
| - Harper types map to JSON Schema primitive types (`Int`/`Long`/`BigInt` → `integer`, `Float` → `number`, `String`/`ID` → `string`, `Boolean` → `boolean`, `Date` → `[string, number]`, `Bytes`/`Blob` → `string` with `contentEncoding: base64`). | ||
| - Nested `Object` and `Array` attributes recurse into their `properties` / `elements`. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static outputSchemascannot currently describe a customsearch_*result: the search registration path deliberately omitsoutputSchemaand never readsoutputSchemas.search. An author following this advice will add an override that has no effect intools/list. Please limit this recommendation to supported verbs (such asget/create), or explicitly state thatsearch_*output schemas are not supported yet.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, and it's now stated as a contract rather than a recommendation.
The Path-B rubric bullet that gave this advice is gone — see the top-level comment for why the whole Path-B section came out (c35e4c5) — but the underlying fact needed to live somewhere, so
resource-api.md'sstatic outputSchemassection now carries a per-verb table, and it says outright thatoutputSchemas.searchis not read at all and asearchentry has no effect ontools/list. Confirmed against v5.2.6: thesearch_*registration passes onlyinputSchema, with nooutputSchemakey and nooverrideOutput('search')call.sent with Claude Opus 5