Support _meta in mcp_tool
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
Research direction
Start by tracing the @mcp_tool decorator and MCPToolContext handling for a tools/call request, then follow where request parameters are mapped into the context. Add coverage for the shown _meta payload and confirm that its fields are available through the context without losing existing headers or tool information.
Written by the indexing model from the issue text.
Description
Description
Currently, the @mcp_tool decorator only supports static metadata defined at registration. However, the MCP Protocol supports a _meta object within the tools/call request parameters. This field is essential for passing dynamic, request-scoped context.
In the current Azure Functions implementation, this _meta information is dropped and is not accessible via func.MCPToolContext.
Observed Behavior
When a client sends a tool call with a _meta block:
{ "method": "tools/call", "params": { "name": "get_job_appointment_details", "arguments": {}, "_meta": { "progressToken": 1, "tenant_id": "123", "user_id": "466", "appointment_id": "789" } } }
And the function is defined as:
@mcp_job.function_name("mcp_get_job_appointment_details")
@mcp_job.mcp_tool()
def get_job_appointment_details(context: func.MCPToolContext):
The context object contains transport headers and basic tool info, but the _meta fields (like tenant_id or appointment_id) are missing entirely from the payload.
Expected Behavior
The MCPToolContext should be updated to include a meta property (or similar) that captures the _meta object from the MCP request. This would allow developers to perform multi-tenant lookups or telemetry tracking based on the caller's specific context.
- Dominant language
- Python
- Stars
- 125
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
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.
More from Azure-Samples/remote-mcp-functions-python
-
Azure-Samples/remote-mcp-functions-python#24 · 1 comment · 2 reactions · 2 assignees ·
-
Difficulty 3/5 1-2 days Newbie friendliness 32/100
Azure-Samples/remote-mcp-functions-python#21 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Azure-Samples/remote-mcp-functions-python#15 · 4 comments ·
All issues in Azure-Samples/remote-mcp-functions-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·