8000
Skip to content

Add a test asserting RegisterAll's tool set matches the lazy dispatcher and ToolCategories #43

Description

@tphakala

There are three hand-maintained lists of tools: the per-file mcp.AddTool registrations reached by RegisterAll (full mode), ToolCategories (discovery and router), and buildToolDispatcher (lazy execution). TestDispatcher_AllCategoryToolsCovered pins dispatcher versus ToolCategories parity, but nothing cross-checks the actual set RegisterAll registers. A tool added in full mode but forgotten in ToolCategories and the dispatcher would compile, pass every test, work in full mode, and be silently uncallable via autotask_execute_tool in lazy mode.

Add a test that enumerates the tools the built server actually registers and asserts set-equality with the dispatcher and ToolCategories, so a future tool cannot silently become lazy-mode-only-broken.

Found during post-merge review (see PR #38).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0