Skip to main content
Glama

deployment_list

List recent deployments for a service in a specific environment to view deployment history and monitor service updates.

Instructions

[API] List recent deployments for a service in a specific environment

⚡️ Best for: ✓ Viewing deployment history ✓ Monitoring service updates

→ Prerequisites: service_list

→ Next steps: deployment_logs, deployment_trigger

→ Related: service_info, service_restart

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesID of the project containing the service
serviceIdYesID of the service to list deployments for
environmentIdYesID of the environment to list deployments from (usually obtained from service_list)
limitNoOptional: Maximum number of deployments to return (default: 10)

Implementation Reference

  • The handler function for the 'deployment_list' tool, which invokes deploymentService.listDeployments with the provided parameters.
    async ({ projectId, serviceId, environmentId, limit = 10 }) => {
      return deploymentService.listDeployments(projectId, serviceId, environmentId, limit);
    }
  • Zod input schema defining parameters for the 'deployment_list' tool: projectId, serviceId, environmentId, and optional limit.
      projectId: z.string().describe("ID of the project containing the service"),
      serviceId: z.string().describe("ID of the service to list deployments for"),
      environmentId: z.string().describe("ID of the environment to list deployments from (usually obtained from service_list)"),
      limit: z.number().optional().describe("Optional: Maximum number of deployments to return (default: 10)")
    },
  • Tool registration using createTool, including name 'deployment_list', formatted description, schema, and handler. Part of the exported deploymentTools array.
    createTool(
      "deployment_list",
      formatToolDescription({
        type: 'API',
        description: "List recent deployments for a service in a specific environment",
        bestFor: [
          "Viewing deployment history",
          "Monitoring service updates"
        ],
        relations: {
          prerequisites: ["service_list"],
          nextSteps: ["deployment_logs", "deployment_trigger"],
          related: ["service_info", "service_restart"]
        }
      }),
      {
        projectId: z.string().describe("ID of the project containing the service"),
        serviceId: z.string().describe("ID of the service to list deployments for"),
        environmentId: z.string().describe("ID of the environment to list deployments from (usually obtained from service_list)"),
        limit: z.number().optional().describe("Optional: Maximum number of deployments to return (default: 10)")
      },
      async ({ projectId, serviceId, environmentId, limit = 10 }) => {
        return deploymentService.listDeployments(projectId, serviceId, environmentId, limit);
      }
    ),
  • DeploymentService.listDeployments method: Fetches deployments via API client, formats with emojis and details, handles empty results and errors.
      async listDeployments(projectId: string, serviceId: string, environmentId: string, limit: number = 5) {
        try {
          const deployments = await this.client.deployments.listDeployments({
            projectId,
            serviceId,
            environmentId,
            limit
          });
    
          if (deployments.length === 0) {
            return createSuccessResponse({
              text: "No deployments found for this service.",
              data: []
            });
          }
    
          const deploymentDetails = deployments.map(deployment => {
            const status = deployment.status.toLowerCase();
            const emoji = status === 'success' ? '✅' : status === 'failed' ? '❌' : '🔄';
            
            return `${emoji} Deployment ${deployment.id}
    Status: ${deployment.status}
    Created: ${new Date(deployment.createdAt).toLocaleString()}
    Service: ${deployment.serviceId}
    ${deployment.url ? `URL: ${deployment.url}` : ''}`;
          });
    
          return createSuccessResponse({
            text: `Recent deployments:\n\n${deploymentDetails.join('\n\n')}`,
            data: deployments
          });
        } catch (error) {
          return createErrorResponse(`Error listing deployments: ${formatError(error)}`);
        }
      }
  • Final registration of all tools, including those from deploymentTools (containing deployment_list), to the MCP server via server.tool.
    export function registerAllTools(server: McpServer) {
      // Collect all tools
      const allTools = [
        ...databaseTools,
        ...deploymentTools,
        ...domainTools,
        ...projectTools,
        ...serviceTools,
        ...tcpProxyTools,
        ...variableTools,
        ...configTools,
        ...volumeTools,
        ...templateTools,
      ] as Tool[];
    
      // Register each tool with the server
      allTools.forEach((tool) => {
        server.tool(
          ...tool
        );
      });
    } 
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation through 'List' and 'Viewing deployment history', but doesn't explicitly state whether it requires authentication, has rate limits, or what format the output takes. It adds some context about 'recent' deployments and the default limit, but lacks comprehensive behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with clear sections (purpose, best for, prerequisites, next steps, related tools) using bullet points and symbols. Every sentence earns its place by providing distinct value without repetition or fluff. The information is front-loaded with the core purpose first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only list tool with 4 parameters and 100% schema coverage but no output schema, the description provides good contextual completeness. It covers purpose, usage scenarios, prerequisites, and related tools. The main gap is the lack of output format description, which would be helpful since there's no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining how environmentId relates to service_list or providing examples of valid IDs. It meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('List recent deployments') with the target resource ('for a service in a specific environment'). It distinguishes itself from sibling tools like deployment_logs (which shows logs) and deployment_trigger (which initiates deployments), establishing a unique read-only history function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance with 'Best for' scenarios (viewing deployment history, monitoring service updates), prerequisites (service_list), next steps (deployment_logs, deployment_trigger), and related tools (service_info, service_restart). This gives clear context for when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/epitaphe360/railway-mcp'

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