Skip to content

feat(thulp-core): add ToolDefinition::to_mcp_input_schema() — bump 0.3.2#18

Merged
bkataru merged 3 commits into
masterfrom
feat/thulp-core-mcp-input-schema
Apr 11, 2026
Merged

feat(thulp-core): add ToolDefinition::to_mcp_input_schema() — bump 0.3.2#18
bkataru merged 3 commits into
masterfrom
feat/thulp-core-mcp-input-schema

Conversation

@bkataru

@bkataru bkataru commented Apr 11, 2026

Copy link
Copy Markdown
Member

Summary

Adds ToolDefinition::to_mcp_input_schema() to thulp-core so callers can
expose tool definitions through MCP-compatible schemas without rebuilding
the JSON shape by hand. Bumps the crate to 0.3.2 along with the
matching Cargo.lock update.

This came out of the pawan-mcp parallel client wrapper work (#20 in pawan)
where pawan needed to bridge thulp tool defs into MCP input schemas at
runtime — the inline reimplementation became a copy-paste hazard, so the
helper lives upstream now.

Commits

  • c4ef220 chore(thulp): sync 3 file(s)
  • a3e3482 feat(thulp-core): add ToolDefinition::to_mcp_input_schema() — bump 0.3.2
  • 6136f56 chore: update Cargo.lock for thulp-core 0.3.2 bump

(Direct push to master was rejected by branch protection — going through PR.)

Test plan

  • cargo build -p thulp-core --release
  • cargo test -p thulp-core — covers the new helper
  • Verify pawan-mcp still builds against the new version once published

🤖 Generated with Claude Code

bkataru and others added 3 commits April 11, 2026 20:10
Inverse of parse_mcp_input_schema(). Converts the typed Vec<Parameter>
into an MCP/OpenAI-compatible JSON Schema Value, suitable for the
tools[].function.parameters field that LLM APIs expect.

Round-trip stable for name, type, required, description, default,
enum_values. +4 unit tests covering basic, round-trip, enum/default
carry, and empty-definition cases.

Also: clarify thulp-registry positioning as a metadata-only catalog
(not an execution runtime). Pawan and ares keep their own executable
ToolRegistry; thulp-registry is for serializable tool catalogs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bkataru bkataru self-assigned this Apr 11, 2026
@bkataru bkataru merged commit 9228d1c into master Apr 11, 2026
8 of 10 checks passed
@bkataru bkataru deleted the feat/thulp-core-mcp-input-schema branch April 11, 2026 20:48
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