Skip to content

Revise how we output tools-call content/structuredContent #346

Description

@jancurn

When running e.g.

mcpc @apify tools-call search-actors keywords:="test"

We print only the text output, even though there is structured one too. We should at least hint about it's presence and how to get it, so the agent can decide for itself to fetch it.

Also, revise how we check and use this info from specs:

Structured content is returned as a JSON object in the structuredContent field of a result.
For backwards compatibility, a tool that returns structured content SHOULD also return the serialized JSON in a TextContent block.

Basically, we can ignore such text if it's just serialized structuredContent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions