Skip to content

Conversation

@mcowger
Copy link
Contributor

@mcowger mcowger commented Oct 24, 2025

Implement dynamic MCP native tool generation support.

Available MCP servers are enumerated for their published tools, and dynamic tool definitions are generated
in the form of use_mcp_tool___servername___toolname.

Implementation

  • Add helper functions to detect and parse dynamic MCP tool names
  • Normalize dynamic tools to standard use_mcp_tool format
  • Use triple underscores (___) as separator to allow underscores in tool names
  • Extract toolInputProps and convert to JSON string for MCP server compatibility
  • Renames properties called type to renamed_type internally before sending to model, because type is a reserved word for many parsers.
  • Update tool name generation in mcp_server.ts
  • Adjust tool definitions to align to OpenAI and Anthropic requirements

…separator

- Add helper functions to detect and parse dynamic MCP tool names
- Normalize dynamic tools to standard 'use_mcp_tool' format
- Use triple underscores (___) as separator to allow underscores in tool names
- Update tool name generation in mcp_server.ts
- Add comprehensive test coverage for dynamic tool parsing
- Extract toolInputProps and convert to JSON string for MCP server compatibility
…ons in text, and align required fields to disallow 'null'.
@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2025

🦋 Changeset detected

Latest commit: 89f60ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mcowger mcowger changed the title Update native tool definitions to align to text and more accurately manage contract Native JSON MCP Tool Calling Oct 26, 2025
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.

2 participants