MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / editRejectedResult

Function editRejectedResult

packages/hosts/mcp/src/tool-server.ts:1040–1052  ·  view source on GitHub ↗
(reason: string, currentCode: string)

Source from the content-addressed store, hash-verified

1038/** An edit batch that could not be applied. Carries the current stored source
1039 * so the model can rebuild its edits without a `show-artifact` round trip. */
1040const editRejectedResult = (reason: string, currentCode: string): McpToolResult => ({
1041 content: [
1042 {
1043 type: "text",
1044 text: [
1045 `edit-artifact rejected: ${reason}`,
1046 "Nothing was changed. The artifact's current source is in structuredContent.code — build the retry against it.",
1047 ].join("\n"),
1048 },
1049 ],
1050 structuredContent: { status: "error", error: reason, code: currentCode },
1051 isError: true,
1052});
1053
1054/** `execute-action` was handed something other than a single proxy-shaped tool
1055 * call. Names the contract rather than just refusing, since the reader is

Callers 1

editArtifactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected