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

Function editRejectedResult

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

Source from the content-addressed store, hash-verified

872/** An edit batch that could not be applied. Carries the current stored source
873 * so the model can rebuild its edits without a `show-artifact` round trip. */
874const editRejectedResult = (reason: string, currentCode: string): McpToolResult => ({
875 content: [
876 {
877 type: "text",
878 text: [
879 `edit-artifact rejected: ${reason}`,
880 "Nothing was changed. The artifact's current source is in structuredContent.code — build the retry against it.",
881 ].join("\n"),
882 },
883 ],
884 structuredContent: { status: "error", error: reason, code: currentCode },
885 isError: true,
886});
887
888/** `execute-action` was handed something other than a single proxy-shaped tool
889 * 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