anthropics / anthropics/claude-agent-sdk-python

Allow SDK MCP Servers to return structured data

未关闭
#695 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
8.1k
派生
1.3k
平均合并
2 天 31 分钟
30 天内合并 PR
1

描述

Currently it only allows either a text or image response due to how it collects the results from the tool:
https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/__init__.py#L322

When I want to return JSON now, I have to JSON marshal it, and then return that, causing a lot of extra tokens and also makes it harder to read for the Agent when it goes over the amount of tokens and has to write away the tool results to a file, because everything is written away to a single line in this format.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。