manage_artifact
Add, get, or search for artifacts within planning system projects to organize and access project resources efficiently.
Instructions
Add, get, or search for artifacts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| plan_id | Yes | Plan ID | |
| node_id | Yes | Node ID | |
| artifact_id | No | Artifact ID (for 'get' action) | |
| name | No | Artifact name (for 'add' or 'search') | |
| content_type | No | Content MIME type (for 'add') | |
| url | No | URL where artifact can be accessed (for 'add') | |
| metadata | No | Additional metadata (for 'add') |
Implementation Reference
- src/tools.js:651-690 (handler)Handler for the 'manage_artifact' tool. Dispatches based on 'action' ('add', 'get', 'search', 'list') and calls corresponding apiClient.artifacts methods to manage artifacts for a plan/node.if (name === "manage_artifact") { const { action, plan_id, node_id, ...params } = args; switch (action) { case "add": const { name, content_type, url, metadata } = params; const newArtifact = await apiClient.artifacts.addArtifact(plan_id, node_id, { name, content_type, url, metadata }); return formatResponse(newArtifact); case "get": const { artifact_id } = params; const artifact = await apiClient.artifacts.getArtifact(plan_id, node_id, artifact_id); const content = await apiClient.artifacts.getArtifactContent(plan_id, node_id, artifact_id); return formatResponse({ ...artifact, content }); case "search": const { name: searchName } = params; const artifacts = await apiClient.artifacts.getArtifacts(plan_id, node_id); const searchLower = searchName.toLowerCase(); const matches = artifacts.filter(a => a.name.toLowerCase().includes(searchLower) ); return formatResponse(matches); case "list": const allArtifacts = await apiClient.artifacts.getArtifacts(plan_id, node_id); return formatResponse(allArtifacts); default: throw new Error(`Unknown artifact action: ${action}`); } }
- src/tools.js:324-345 (schema)Schema definition for the 'manage_artifact' tool, including input parameters and validation rules.{ name: "manage_artifact", description: "Add, get, or search for artifacts", inputSchema: { type: "object", properties: { action: { type: "string", description: "Action to perform", enum: ["add", "get", "search", "list"] }, plan_id: { type: "string", description: "Plan ID" }, node_id: { type: "string", description: "Node ID" }, artifact_id: { type: "string", description: "Artifact ID (for 'get' action)" }, name: { type: "string", description: "Artifact name (for 'add' or 'search')" }, content_type: { type: "string", description: "Content MIME type (for 'add')" }, url: { type: "string", description: "URL where artifact can be accessed (for 'add')" }, metadata: { type: "object", description: "Additional metadata (for 'add')" } }, required: ["action", "plan_id", "node_id"] } },
- src/tools.js:324-345 (registration)Registration of the 'manage_artifact' tool in the list of available tools returned by listTools.{ name: "manage_artifact", description: "Add, get, or search for artifacts", inputSchema: { type: "object", properties: { action: { type: "string", description: "Action to perform", enum: ["add", "get", "search", "list"] }, plan_id: { type: "string", description: "Plan ID" }, node_id: { type: "string", description: "Node ID" }, artifact_id: { type: "string", description: "Artifact ID (for 'get' action)" }, name: { type: "string", description: "Artifact name (for 'add' or 'search')" }, content_type: { type: "string", description: "Content MIME type (for 'add')" }, url: { type: "string", description: "URL where artifact can be accessed (for 'add')" }, metadata: { type: "object", description: "Additional metadata (for 'add')" } }, required: ["action", "plan_id", "node_id"] } },