Skip to content

[Feature]: Add json abstract when saving context from mcp #15344

@lshpeng

Description

@lshpeng

Note

This issue was translated by Claude.

Issue Checklist

  • I understand that issues are for reporting problems and requesting features, not for off-topic comments, and I will provide as much detail as possible to help resolve the issue.
  • I have checked the pinned issues and searched through the existing open issues, closed issues, and discussions and did not find a similar suggestion.
  • I have provided a short and descriptive title so that developers can quickly understand the issue when browsing the issue list, rather than vague titles like "A suggestion" or "Stuck."
  • The latest version of Cherry Studio does not include the feature I am suggesting.

Platform

Windows

Version

v1.9.6

Is your feature request related to an existing issue?

When MCP returns too much data, read errors often occur.

Desired Solution

Suggestion for improving CherryStudio:

When large MCP results are saved to tool-results/, write a JSON summary metadata on the first line of the file to help the Agent precisely locate the required data:

{"_meta":{"total_rows":144,"columns":["trade_date","ts_code","close","pct_chg",...],"avg_bytes_per_row":430}}

This way, the Agent can use Read(offset=N, limit=1KB) to precisely locate the required rows, instead of having to read the entire file every time or repeatedly try queries. The workload is very small—just add one line json.dumps(meta) + "\n" before writing the file.

Alternative Solutions

No response

Additional Information

No response


Original Content

Issue Checklist

  • I understand that issues are for reporting problems and requesting features, not for off-topic comments, and I will provide as much detail as possible to help resolve the issue.
  • I have checked the pinned issues and searched through the existing open issues, closed issues, and discussions and did not find a similar suggestion.
  • I have provided a short and descriptive title so that developers can quickly understand the issue when browsing the issue list, rather than vague titles like "A suggestion" or "Stuck."
  • The latest version of Cherry Studio does not include the feature I am suggesting.

Platform

Windows

Version

v1.9.6

Is your feature request related to an existing issue?

当mcp返回过长时,经常读取错误

Desired Solution

给 CherryStudio 的改进建议:

大 MCP 结果落盘到 tool-results/ 时,在文件第一行写入一行 JSON 摘要元数据,帮助 Agent 精确定位所需数据:

Json
{"_meta":{"total_rows":144,"columns":["trade_date","ts_code","close","pct_chg",...],"avg_bytes_per_row":430}}这样 Agent 可以用 Read(offset=N, limit=1KB) 精确定位到需要的行,而不是每次都要读整个文件或反复试 query。工作量很小——在写文件前加一行 json.dumps(meta) + "\n" 即可。

Alternative Solutions

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCPCategorizes an issue or PR as relevant to SIG MCP
    No fields configured for Feature.

    Projects

    Status

    Draft_Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions