Skip to content

MCP increment 2: typed tool inputSchema from Forms - #141

Merged
WebTigers merged 1 commit into
mainfrom
feat/mcp-typed-schema
Aug 17, 2026
Merged

MCP increment 2: typed tool inputSchema from Forms#141
WebTigers merged 1 commit into
mainfrom
feat/mcp-typed-schema

Conversation

@WebTigers

Copy link
Copy Markdown
Owner

Increment 2 of TigerMCP (§11): tools/list types 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 by module/service/method. Reuse point for MCP; also usable by /api/openapi.
  • Tiger_Mcp_Server::_toolsList reflects it into each tool's inputSchema, fault-tolerant (permissive object if reflection ever fails).
  • A method types its arguments by declaring @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__save now 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 @apiRequest across the remaining writable services — benefits the OpenAPI spec by the same mechanism.

🤖 Generated with Claude Code

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>
@WebTigers
WebTigers merged commit 93246d6 into main Aug 17, 2026
13 checks passed
@WebTigers
WebTigers deleted the feat/mcp-typed-schema branch August 17, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant