Curating the tool surface
Control which OpenAPI operations become MCP tools.
Why curate
An OpenAPI spec built for humans is generous—hundreds of small, separate endpoints. Agents pay a real cost for every tool they see: more context, more chances to pick the wrong one. Converting every operation into a tool, 1:1, can leave agents with a bloated, confusing tool list.
Curation lets you decide what agents actually see.
By tag
Most specs group operations with OpenAPI tags. Use these to include or exclude by tag:
npx klaridian generate --spec ./api.yaml --out ./my-server \
--exclude-tags internal,adminnpx klaridian generate --spec ./api.yaml --out ./my-server \
--include-tags publicBy operation ID
Exclude specific operations regardless of tag:
npx klaridian generate --spec ./api.yaml --out ./my-server \
--exclude-operation-ids deleteAccount,purgeDataBy path or method
Some specs don't use tags at all. --include-paths, --exclude-paths, --include-methods, and --exclude-methods work without them—they match on the operation's URL path (regex) or HTTP method:
npx klaridian generate --spec ./api.yaml --out ./my-server \
--exclude-paths "^/internal/" \
--exclude-methods deletePath/method filters and tag filters can combine—an operation must pass both to be included.
Interactively
Prefer to pick tags by hand instead of writing flags? Use --interactive:
npx klaridian generate --spec ./api.yaml --out ./my-server --interactiveThis prompts you for which tags to include before generating. It needs a real terminal—it fails with a clear error in CI or scripts, instead of silently generating with no tools.