Skip to main content
Glama

batch_get_artifacts

Retrieve multiple planning artifacts simultaneously by specifying plan ID and artifact requests to efficiently access structured project data.

Instructions

Get multiple artifacts at once

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_idYesPlan ID
artifact_requestsYesList of artifact requests

Implementation Reference

  • The main execution handler for the 'batch_get_artifacts' tool. Loops through artifact_requests, fetches each artifact metadata and content via apiClient, handles errors individually, and returns aggregated results with successes and failures.
    if (name === "batch_get_artifacts") { const { plan_id, artifact_requests } = args; const results = []; const errors = []; for (const request of artifact_requests) { const { node_id, artifact_id } = request; try { const artifact = await apiClient.artifacts.getArtifact(plan_id, node_id, artifact_id); const content = await apiClient.artifacts.getArtifactContent(plan_id, node_id, artifact_id); results.push({ node_id, artifact_id, success: true, data: { ...artifact, content } }); } catch (error) { errors.push({ node_id, artifact_id, success: false, error: error.message }); } } return formatResponse({ total: artifact_requests.length, successful: results.length, failed: errors.length, results, errors }); }
  • Input schema definition for the batch_get_artifacts tool, specifying required plan_id and array of artifact_requests with node_id and artifact_id.
    inputSchema: { type: "object", properties: { plan_id: { type: "string", description: "Plan ID" }, artifact_requests: { type: "array", description: "List of artifact requests", items: { type: "object", properties: { node_id: { type: "string", description: "Node ID" }, artifact_id: { type: "string", description: "Artifact ID" } }, required: ["node_id", "artifact_id"] } } }, required: ["plan_id", "artifact_requests"] }
  • src/tools.js:376-398 (registration)
    Tool registration in the ListToolsRequestSchema handler's tools array, including name, description, and inputSchema.
    { name: "batch_get_artifacts", description: "Get multiple artifacts at once", inputSchema: { type: "object", properties: { plan_id: { type: "string", description: "Plan ID" }, artifact_requests: { type: "array", description: "List of artifact requests", items: { type: "object", properties: { node_id: { type: "string", description: "Node ID" }, artifact_id: { type: "string", description: "Artifact ID" } }, required: ["node_id", "artifact_id"] } } }, required: ["plan_id", "artifact_requests"] } },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TAgents/agent-planner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server