Repository navigation
Conversation
…elf-contained, catalog identity is the spec seal hash (Refs gHashTag/t27#10444) schema.mjs builds each tool's JSON Schema from the rows of wasm/tool_schema_table.mjs (t27c gen-js of the spec). The inline inputSchema blocks in server.mjs and telegram.mjs are gone: 137 lines deleted, 64 added. A tool with no row stops the server at start. tools/list carries _meta["t27/catalog"] = <seal spec_hash>/p<profile>. Output schemas are opt-in (T27_MCP_OUTPUT_PROFILE=1, protocol 2025-06-18, structuredContent). smoke.mjs reads tuple, array, boolean and nested-object constraints back off the wire. npm run check:schema. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary by t27-beesThis PR replaces ~20 inline JSON Schema blocks in Worth a look
Read: 9 files, +224 -139, the whole diff up to 60000 characters (the rest was not read). Head |
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.
Refs gHashTag/t27#10444. Companion of gHashTag/t27#10446 (the spec
specs/t27mcp/tool_schema.t27, which must merge first; this PR carries its generated table and seal).What
Every tool's
inputSchemais now built from rows ofwasm/tool_schema_table.mjs, thet27c gen-jsoutput ofspecs/t27mcp/tool_schema.t27(27 tool rows, 270 field rows).schema.mjs(39 lines) turns the rows into JSON Schema and decides nothing about a field. The ~20 inline schema blocks inserver.mjsand thetgToolsschemas intelegram.mjsare gone.$ref,$defsordefinitions; every input object setsadditionalProperties: false.tool X has no row in specs/t27mcp/tool_schema.t27).tools/listreturns_meta["t27/catalog"] = <seal spec_hash>/p<profile>: the catalog identity is the spec's seal hash plus the output profile. Seal copied unchanged towasm/tool_schema.seal.json.T27_MCP_OUTPUT_PROFILE=1advertises protocol 2025-06-18, anoutputSchemaon the 15 object-returning tools, andstructuredContenton their results. The default profile (0) is protocol 2024-11-05 with inputs only, as before.prefixItems+minItems/maxItems,items,type: boolean, nestedproperties).Before and after
See the table in gHashTag/t27#10446 (measured on this repo's master 792c0e4). In short: 0 of 26 tools declared an output shape, now 15 of 27 do (opt-in; the other 12 return text or arbitrary JSON); 23 integer fields were unbounded
number, nowintegerwith bounds; 6 closed sets were free strings, now enums; 6 fields gain patterns;t27_gamerules.cycleis a five-step tuple; 8 tools stop copying one filter block.Tests
smoke.mjs(live stdio, as before) gains 9 checks, read back off the wire: every advertised tool has a row; no$ref/$defs/definitions; every input refuses unknown keys; the catalog identity equals the seal hash plus profile;t27f_viewstatusarray (max 27, items 0..255); boolean/enum/integer bound/required ont27_grepandt27_specs; thet27_gametuple; thehits.linebound four levels down; the profile's output-schema rule (and, under profile 1,structuredContentequals the text result). Both profiles pass (node smoke.mjs,T27_MCP_OUTPUT_PROFILE=1 node smoke.mjs).npm run check:schemachecks the table and seal againstwasm/tool_schema.build.Spec side: 12 of 12 tests pass, 0 vacuous, a mutated tuple row fails 2 (see #10446).
Language budget
Hand-written JS (glue): +64 / -137 lines, net -73. Per file:
schema.mjs+39 (new),server.mjs+5/-130,smoke.mjs+18/-1,telegram.mjs+2/-6. No file exceeds 40 added lines; the PR adds 64 (limit 80). The generated table and seal are data from the spec.Note for #23 (
t27_paper_claims): the spec already has a row for it, so its inlineinputSchemashould be dropped when it rebases;schemas()supplies it.🤖 Generated with Claude Code