You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6268548
Browse filesBrowse the repository at this point in the historyBrowse files
Stop mirroring file bodies in get_file_contents structured output
get_file_contents returned each file twice on protocol 2026-07-28: once in
the embedded resource and again as text/blob in structuredContent. Clients
that forward both to the model paid for every file twice. Structured output
now carries only the resource uri and mimeType; the body stays in content.
Modern JSON text for all-text results is also encoded without HTML escaping,
so it matches JSON.stringify(structuredContent) and clients can dedupe it.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
// Repository contents can be a projected directory listing or a heterogeneous
215
-
// MCP content response. The latter is represented losslessly as typed content
216
-
// blocks, including the human-readable status and embedded text/blob or link.
214
+
// MCP content response. The latter is represented as typed content blocks,
215
+
// including the human-readable status and resource or link metadata. File
216
+
// bodies stay in the result content and are not repeated in structured output.
217
217
typeRepositoryContentsOutputstruct {
218
218
Directory []*RepositoryDirectoryEntryOutput
219
219
Content*RepositoryContentOutput
@@ -324,14 +324,15 @@ type RepositoryTextBlock struct {
324
324
325
325
typeRepositoryResourceBlockstruct {
326
326
Typestring`json:"type"`
327
-
ResourceRepositoryResourceOutput`json:"resource"`
327
+
ResourceRepositoryResourceOutput`json:"resource" jsonschema:"Metadata for the embedded resource. The file body is returned only in the result content, not repeated here."`
328
328
}
329
329
330
+
// RepositoryResourceOutput describes an embedded file resource without its
331
+
// body, so clients that forward both content and structured output to a model
0 commit comments