toolhive icon indicating copy to clipboard operation
toolhive copied to clipboard

Add proposal for tool definitions in publisher extensions

Open JAORMX opened this issue 1 month ago • 1 comments

Summary

Proposes adding comprehensive tool metadata to the existing ToolHive publisher extension (io.github.stacklok) in the upstream MCP Registry format. This extends beyond simple tool names to include full MCP tool definitions with descriptions, input/output schemas, and annotations.

What's Changing

  • Adds tool_definitions field to the existing io.github.stacklok publisher extension
  • Stores full MCP tool metadata: name, title, description, inputSchema, outputSchema, annotations
  • Maintains backward compatibility with existing tools string array

Use Cases

  1. Enhanced tooling output - thv list can show tool descriptions
  2. API contract breakage detection - Compare schemas to detect breaking changes in server updates
  3. Client integrations - IDEs/editors can display tool signatures and validate inputs

Technical Details

  • Reuses existing extension namespace (no new namespaces)
  • Aligns with MCP specification tool schema
  • Optional field - servers without it continue to work
  • Type-safe deserialization using existing converter patterns

🤖 Generated with Claude Code

JAORMX avatar Nov 25 '25 18:11 JAORMX

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 55.64%. Comparing base (35a0dc3) to head (96b485d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2733   +/-   ##
=======================================
  Coverage   55.64%   55.64%           
=======================================
  Files         314      314           
  Lines       30445    30445           
=======================================
  Hits        16942    16942           
  Misses      12016    12016           
  Partials     1487     1487           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Nov 25 '25 18:11 codecov[bot]