You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 24ae82f
Browse filesBrowse the repository at this point in the historyBrowse files
The MCP server's tools answer from the catalogue of operations (#2122)
Part of #1684
Each tool called the library's methods itself. Its answers now come from
the entries of Core/Operations/Catalogue.cs: Catalogue.Solve.Ask(e, x)
where it called e.Solve(x), and so on. Every entry answers exactly what
its method answers, so no answer changes, and the 335 tests that drive
the server pass as they did. The server's own checks of an answer stay
direct calls: differentiating an antiderivative back, reading an input as
an integer or a decimal, and the guard before quadrature.
Tools.Offers says which entries each tool offers. Tools.OwnComputations
lists the six tools whose answer is the server's own computation, such as
am_check_steps, each with what it computes. Tools.NotOffered lists the
two entries no tool offers, normalize and evaluate, each with the reason.
The server's CatalogueTest checks the three against the tool list and
the catalogue. An entry added to the catalogue fails it until a tool
offers it or NotOffered says why none does.
amcli's one-shot commands get the same check, without calling the
catalogue: OneShot.offers names the entry each command offers,
ownCommands says what info, mcp and help do, and notOffered lists the
entries no command offers. Which commands to add is #1019 item 16's
question. OneShotTest reads the catalogue's names by reflection, since
the terminal is not one of the library's friends.
Removing one tool and one entry from the server's lists fails both of its
tests and names each, and the same for one command and one entry in the
terminal's.
The catalogue is internal, so the library names the server in its
InternalsVisibleTo. A strong-named assembly may only befriend another
one, so the server is signed with the library's key, as the unit tests
are, and so is McpUnitTests, which the server befriends. The server
ships inside amcli with the library it was built against.
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0 commit comments