MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / execute

Method execute

src/tools/artifacts/artifact-tools.ts:130–140  ·  view source on GitHub ↗
(args: z.infer<typeof GetArgs>, ctx: ToolContext)

Source from the content-addressed store, hash-verified

128 description = 'Read the content of an artifact version (defaults to the current version).';
129 argsSchema = GetArgs;
130 isReadOnly = true;
131 isDestructive = false;
132
133 async execute(args: z.infer<typeof GetArgs>, ctx: ToolContext): Promise<ToolResult> {
134 try {
135 const { manifest, version, content } = await getArtifact(ctx.cwd, resolveArtifactId(args), args.version);
136 return {
137 content: `Artifact "${manifest.id}" v${version} (${manifest.type}):\n\n${content}`,
138 metadata: { artifactId: manifest.id, version, type: manifest.type },
139 };
140 } catch (e: any) {
141 return { content: e?.message ?? String(e), isError: true };
142 }
143 }

Callers

nothing calls this directly

Calls 2

getArtifactFunction · 0.85
resolveArtifactIdFunction · 0.85

Tested by

no test coverage detected