No support for tool outputSchema (MCP spec 2025-06-18)
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
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.
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.
- Dominant language
- R
- Stars
- 207
- Forks
- 24
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from posit-dev/mcptools
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in posit-dev/mcptools
Similar issues
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothOpenarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#383 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PRL-PRG/r-compile-server#70 · 1 comment ·
-
dependencies docker enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
posit-dev/images-workbench#257 ·
Maintainers usually reply within 1 day
-
dependencies docker enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
posit-dev/images-package-manager#188 ·
Maintainers usually reply within 1 day
-
dependencies docker enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
posit-dev/images-connect#222 ·
Maintainers usually reply within 1 day