Skip to content

MCP tool results should set is_error: true when validation fails #1952

@sicoyle

Description

@sicoyle

Describe the bug

When a tool fails due to validation (ex: missing required parameter owner), the response should indicate an error and set is_error: true or the proper error structure. Currently, is_error gets set to false with error text in content. This means that downstream clients are not able to treat this as a failure, so in my case my Dapr Agent is not able to properly handle this failure.

additional context: dapr/dapr-agents#423

Affected version

Remote MCP server endpoint: https://api.githubcopilot.com/mcp/.

Steps to reproduce the behavior

You can reproduce the issue by running my release note agent:
https://github.com/sicoyle/release-note-agent

Expected vs actual behavior

I should be able to parse the error field appropriately in Dapr Agents repo.

Logs

lResult'>)
GithubGetReleaseByTag(tool) (Id: call_eECqd2eObRNweLdG2AHHfMTZ):
{"meta": null, "content": [{"type": "text", "text": "missing required parameter: owner", "annotations": null, "meta": null}], "structured_content": null, "is_error": false}

-----------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions