Skip to main content
Glama
TAgents

Planning System MCP Server

by TAgents

batch_get_artifacts

Retrieve multiple artifacts simultaneously from a planning system using 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

  • Handler function that processes batch artifact requests by fetching each artifact and its content using apiClient, collecting successes and errors, and returning formatted response.
    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
      });
    }
  • Tool schema definition including name, description, and input schema for batch_get_artifacts, used in tool registration.
    {
      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