Repository navigation
t27mcp: tool_schema.t27 -- one row per tool and per field, so the MCP JSON schemas are generated, not written by hand (Closes #10444) - #10446
Merged
Conversation
This was referenced Oct 18, 2026
… JSON schemas are generated, not written by hand (Closes #10444) 27 tools (26 on t27-mcp master plus t27_paper_claims), 270 field rows, inputs and outputs, with tuple, array, boolean, nested-object, enum, pattern and bounds rows; the spec filters of t27_specs and t27_grep are one group. 12 tests, 0 vacuous, negative controls for step, name, children, bounds, text and flags laws. Its seal hash is the catalog identity a client caches. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
force-pushed
the
claude/peaceful-jennings-de9177
branch
from
October 18, 2026 11:58
8e76cbe to
0220854
Compare
This was referenced Oct 18, 2026
Contributor
gHashTag
enabled auto-merge (squash)
October 18, 2026 12:18
This was referenced Oct 18, 2026
gHashTag
added a commit
that referenced
this pull request
Oct 18, 2026
… with provider/schema's Tool (Closes #10459) (#10460) #10446 added a second type named Tool beside specs/provider/schema.t27's Tool, and the types ratchet on master turned red ("+ Tool NEW conflict"). The newer one is renamed; the spec is resealed (12/12 tests, 0 vacuous) and tri types ratchet is CLEAN on the lab. Co-authored-by: Claude Opus 5.5 <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.
Closes #10444
What
specs/t27mcp/tool_schema.t27(moduleT27mcpToolSchema) declares the input and output schema of every tool of the t27 MCP server (gHashTag/t27-mcp): 27 tool rows (the 26 on t27-mcp master plust27_paper_claimsfrom t27-mcp#23) and 270 field rows. The MCP JSON schemas are generated from it byt27c gen-jsand a table-driven builder in t27-mcp (companion PR there). The idea comes from the morluto/rea 6.6.0 "MCP contracts" fix: self-contained inputs, tuple/array/boolean/nested-object constraints kept in every profile, the output-schema profile in the catalog identity.The catalog identity is this spec's seal
spec_hashplus the output profile, so a client can tell that a schema changed. The seal is committed here (.trinity/seals/t27mcp_T27mcpToolSchema.json).Measured: before and after
Measured on t27-mcp master (792c0e4) by reading
server.mjsandtelegram.mjs.outputSchema(0 of 26)t27_formatas a bare object, because it returns a catalog row of open shape); the other 12 are honest: 11 return text (4t27*and the 7tg_*),t27_rawreturns arbitrary JSONnumber, unbounded:limit(x6),maxSpecs,maxHitsPerSpec,bits,minLines,maxLines, Telegramlimit(x5)integerwith minimum;maxSpecs1..150,find.limit1..20, Telegramlimit0..100string:health,status,sort,state, paper, verdictok/warn/fail, five catalog statuses, eight sort keys (incl. thedepthandbytesthe handler already accepts),open/closed, paper and verdict setst27f_viewranges undeclared: scene, preset, look, status, labels, rowsstatusarray of at most 27 items each 0..255,labelsat most 27,rowsat most 4t27f_graph.fixtureundeclared ranget27_raw.pathno description or pattern^/[^/]and a descriptionchata bare string,required: []on tools that need an argumentchatandqueryrequired;query1..200 characterst27f_outline.pathandt27f_graph.pathfree strings.t27pathfresh,ref,fields,sourcemostly without descriptionadditionalProperties: falserequiredand enums only in proseG_SPEC_FILTERSgroupt27_gamerules.cycleis a five-step tuple (prefixItems+minItems/maxItems)Not done here: defaults are still in descriptions ("Default 50"), not a
defaultcolumn.Tests
t27c test-report specs/t27mcp/tool_schema.t27on the Railway lab: 12 of 12 pass, 0 vacuous. Covers table sizes and names, unique tool names, contiguous blocks, per-row laws (depth steps, names vs parent kind, child counts, bounds, enum/pattern only on strings, required/nullable), unique property names, every tool has rows or declares text/any, the filter group, the input constraints that used to be missing (23 integers, 6 enums, 6 patterns), and fixtures for a tuple, nested arrays/objects, a required boolean and a bounded array. Three negative-control tests prove the laws can fail. Mutating thecycletuple'shifrom 5 to 6 fails 2 tests.t27c gen-jsaccepts the struct arrays and emitswasm/tool_schema_table.mjsin t27-mcp.Language budget
No hand-written non-t27 code in this PR.
🤖 Generated with Claude Code