Skip to content

Conversation

@shamashel
Copy link

Summary

Documents the new @mcpTool(name: "...") directive that allows users to override default MCP tool names.

Related to: wundergraph/cosmo#2308
Implementation PR: wundergraph/cosmo#2433

Changes

  • Added "Custom Tool Names" subsection under "Operation Naming and Tool Generation"
  • Includes example showing directive usage
  • Documents key behaviors (auto-stripping, fallback to default naming)

Preview

The new section shows:

query GetEmployee($id: Int!) @mcpTool(name: "get_employee_by_id") {
  employee(id: $id) { ... }
}

This creates tool get_employee_by_id instead of default execute_operation_get_employee.

@shamashel shamashel requested review from a team as code owners December 29, 2025 18:32
@shamashel shamashel requested review from JivusAyrus, StarpTech, asoorm and wilsonrivera and removed request for a team December 29, 2025 18:32
@shamashel shamashel force-pushed the mike/2308-mcptool-directive-docs branch from 003dabf to 0e06a75 Compare December 29, 2025 18:47
@shamashel
Copy link
Author

Closing in favor of #221, which documents the config-based approach (omit_operation_prefix) from wundergraph/cosmo#2441 instead of the directive-based approach.

@shamashel shamashel closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant