mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-10-13 04:01:35 +00:00
docs(stat): say which consumers actually see mime and frontmatter
Review feedback on #566: the module docstring told the agent it gets "mime type and ... the parsed frontmatter alongside in metadata", which reads as though an agent can use those fields to decide whether to download or parse a file. It cannot: the MCP service returns only `response.answer` (`mcp_tools.py` -> `return response.answer`), so `metadata["mime"]` and `metadata["frontmatter"]` reach direct `Response` consumers but never an MCP caller. Spell the split out instead of implying one audience: the answer carries path, type, size and mtime, and an agent that needs the frontmatter has to read the file rather than stat it. The envelope description below is unchanged, since it already lists the full metadata shape.
This commit is contained in:
parent
0024d3a8de
commit
74c26656ea
1 changed files with 6 additions and 4 deletions
|
|
@ -1,9 +1,11 @@
|
|||
"""``file_stat`` — peek at file metadata under the workspace without copying it.
|
||||
|
||||
Cheap inspection alternative to ``file_download``: the agent gets
|
||||
size and mtime in the answer, with mime type and (for markdown files)
|
||||
the parsed frontmatter alongside in metadata — enough to decide whether
|
||||
to download / parse / skip without paying the copy cost.
|
||||
Cheap inspection alternative to ``file_download``. The answer carries the
|
||||
path, type, size and mtime, and the answer is all an MCP caller receives:
|
||||
MCP returns only ``response.answer``. ``mime`` and, for markdown files,
|
||||
the parsed frontmatter stay in ``metadata`` with the rest of the envelope,
|
||||
so they reach direct ``Response`` consumers but never an MCP caller — an
|
||||
agent that needs the frontmatter must read the file, not stat it.
|
||||
|
||||
Returns a uniform envelope:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue