posit-dev / posit-dev/mcptools
No support for tool outputSchema (MCP spec 2025-06-18)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 196
- Forks
- 21
- Avg merge
- 1h 14m
- Merged PRs (30d)
- 1
Description
Problem
The MCP spec (2025-06-18) defines an outputSchema field on tool definitions — a JSON Schema describing the expected structure of tool results. This enables clients to validate outputs and provides type information for better integration.
Neither tool_as_json() nor ellmer::tool() currently support declaring an output schema.
Expected
ellmer::tool(
fun = function() list(auc = 0.92, tss = 0.81),
name = "evaluate_model",
description = "Evaluate model performance",
arguments = list(),
outputSchema = list(
type = "object",
properties = list(
auc = list(type = "number"),
tss = list(type = "number")
),
required = c("auc", "tss")
)
)
Should produce in tools/list:
{
"name": "evaluate_model",
"description": "Evaluate model performance",
"inputSchema": {...},
"outputSchema": {
"type": "object",
"properties": {
"auc": {"type": "number"},
"tss": {"type": "number"}
},
"required": ["auc", "tss"]
}
}
Use Case
Building an SDM MCP server with ~70 tools. Each tool returns structured data (metrics, file paths, statistics). outputSchema would let clients validate every tool response automatically instead of parsing free-form text.
Fix
- Add
outputSchemaparameter toellmer::tool()(stores on ToolDef) - Include in
tool_as_json()output in mcptools
Depends on ellmer changes first, then mcptools serialization.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking how ellmer::tool() stores definitions in ToolDef and how mcptools::tool_as_json() serializes them. Confirm the upstream ellmer change is available, then trace the tools/list output path. Done means a declared outputSchema is preserved and emitted in the expected JSON structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100