MCP increment 2: typed tool inputSchema from Forms - #141
Merged
Conversation
tools/list now types each tool's arguments from the method's Form instead of a
bare {type:object} (TIGERMCP.md §11 step 2).
- Tiger_OpenApi_Generator::schemasByOp() — expose the Form→JSON-Schema mapping the
generator already builds, keyed by module/service/method (reuses _requestSchema /
_formSchema; benefits /api/openapi too).
- Tiger_Mcp_Server::_toolsList reflects it into each tool's inputSchema; fault-tolerant
(a permissive object if reflection fails).
- A method types its args by declaring @APIrequest <FormClass>. Nothing did yet, so
the curated create/edit tools now carry it: Cms_Form_Page, Blog_Form_Post,
Access_Form_User, Access_Form_Org. (Backfilling the rest is a follow-on and helps
the OpenAPI spec identically.)
- Test: cms__page__save exposes a typed inputSchema (title/slug/... properties).
Live on dev: 14 typed Cms_Form_Page fields. Full unit 837 + integration 1104 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increment 2 of TigerMCP (§11):
tools/listtypes each tool's arguments from the method's Form instead of a bare{type:object}, so a client's model knows exactly what a tool takes.What
Tiger_OpenApi_Generator::schemasByOp()— exposes the Form→JSON-Schema mapping the generator already builds (from@apiRequest <FormClass>→_formSchema), keyed bymodule/service/method. Reuse point for MCP; also usable by/api/openapi.Tiger_Mcp_Server::_toolsListreflects it into each tool'sinputSchema, fault-tolerant (permissive object if reflection ever fails).@apiRequest <FormClass>. Nothing did yet (the generator's typing was latent), so the curated create/edit tools now carry it:Cms_Form_Page,Blog_Form_Post,Access_Form_User,Access_Form_Org.Verified
cms__page__savenow exposes a typed schema — live on dev:page_id, title, slug, page_key, type, format, status, locale, layout_key, published_at, body, meta_description, head_html, body_scripts. Test asserts the typed properties. OpenApi (10) + full unit (837) + integration (1104) green.Follow-on: backfill
@apiRequestacross the remaining writable services — benefits the OpenAPI spec by the same mechanism.🤖 Generated with Claude Code