Skip to main content
Glama
netlify

Netlify MCP Server

Official
by netlify

netlify-deploy-services-reader

Read-only

Retrieve detailed information about Netlify deployments by providing a deploy ID or site ID to access deployment status and configuration data.

Instructions

Select and run one of the following Netlify read operations (read-only) get-deploy, get-deploy-for-site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectSchemaYes

Implementation Reference

  • Registers the 'netlify-deploy-services-reader' tool for the deploy domain read operations (get-deploy, get-deploy-for-site). The toolName is constructed as netlify-deploy-services-reader.
    const friendlyOperationType = operationType === 'read' ? 'reader' : 'updater';
    const toolName = `netlify-${domain}-services-${friendlyOperationType}`;
    const toolDescription = `Select and run one of the following Netlify ${operationType} operations${readOnlyIndicator} ${toolOperations.join(', ')}`;
    
    server.registerTool(toolName, {
      description: toolDescription,
      inputSchema: paramsSchema,
      annotations: {
        readOnlyHint: operationType === 'read'
      }
    }, async (...args) => {
  • The main handler function for the 'netlify-deploy-services-reader' tool. It authenticates, parses the input to select the sub-operation (get-deploy or get-deploy-for-site), executes the corresponding subtool callback, and returns the JSON result.
    }, async (...args) => {
      checkCompatibility();
    
      try {
        await getNetlifyAccessToken(remoteMCPRequest);
      } catch (error: NetlifyUnauthError | any) {
        if (error instanceof NetlifyUnauthError && remoteMCPRequest) {
          throw new NetlifyUnauthError();
        }
    
        return {
          content: [{ type: "text", text: error?.message || 'Failed to get Netlify token' }],
          isError: true
        };
      }
    
      appendToLog(`${toolName} operation: ${JSON.stringify(args)}`);
    
      const selectedSchema = args[0]?.selectSchema as any;
    
      if (!selectedSchema) {
        return {
          content: [{ type: "text", text: 'Failed to select a valid operation. Retry the MCP operation but select the operation and provide the right inputs.' }]
        }
      }
    
      const operation = selectedSchema.operation;
    
      const subtool = tools.find(subtool => subtool.operation === operation);
    
      if (!subtool) {
        return {
          content: [{ type: "text", text: 'Agent called the wrong MCP tool for this operation.' }]
        }
      }
    
      const result = await subtool.cb(selectedSchema.params || {}, {request: remoteMCPRequest, isRemoteMCP: !!remoteMCPRequest});
    
      appendToLog(`${domain} operation result: ${JSON.stringify(result)}`);
    
      return {
        content: [{ type: "text", text: JSON.stringify(result) }]
      }
    });
  • Input schema definition for the grouped reader tool, using a union of selector schemas for each deploy read operation.
    const paramsSchema = {
      // @ts-ignore
      selectSchema: tools.length > 1 ? z.union(tools.map(tool => toSelectorSchema(tool))) : toSelectorSchema(tools[0])
    };
  • Sub-tool helper: 'get-deploy' operation fetches details of a specific deploy by its ID using the Netlify API.
    export const getDeployByIdDomainTool: DomainTool<typeof getDeployByIdParamsSchema> = {
      domain: 'deploy',
      operation: 'get-deploy',
      inputSchema: getDeployByIdParamsSchema,
      toolAnnotations: {
        readOnlyHint: true,
      },
      cb: async (params, {request}) => {
        const { deployId } = params;
        return JSON.stringify(await getAPIJSONResult(`/api/v1/deploys/${deployId}`, {}, {}, request));
      }
    }
  • Sub-tool helper: 'get-deploy-for-site' operation fetches deploy details by site ID and deploy ID using the Netlify API.
    export const getDeployBySiteIdDomainTool: DomainTool<typeof getDeployBySiteIdParamsSchema> = {
      domain: 'deploy',
      operation: 'get-deploy-for-site',
      inputSchema: getDeployBySiteIdParamsSchema,
      toolAnnotations: {
        readOnlyHint: true,
      },
      cb: async (params, {request}) => {
        const { siteId, deployId } = params;
        return JSON.stringify(await getAPIJSONResult(`/api/v1/sites/${siteId}/deploys/${deployId}`, {}, {}, request));
      }
    }
Behavior3/5

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

The description adds '(read-only)' which aligns with the readOnlyHint: true annotation, confirming it's a safe read operation without contradiction. However, it provides minimal behavioral context beyond what annotations already declare (e.g., no details on rate limits, authentication needs, error handling, or what data is returned). With annotations covering the safety profile, the description adds some value by reinforcing the read-only nature but lacks rich behavioral disclosure.

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

Conciseness4/5

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

The description is concise with a single sentence that front-loads the core action ('Select and run one of the following Netlify read operations') and lists the operations. There's no wasted text, but it could be more structured (e.g., bullet points for operations). It efficiently conveys the tool's scope without redundancy, though it lacks depth.

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

Completeness2/5

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

Given the complexity (multiple operations via selectSchema), no output schema, and minimal annotations (only readOnlyHint), the description is incomplete. It doesn't explain what the operations return, how to choose between them, or any prerequisites (e.g., required IDs). For a tool with nested parameter structures and sibling tools, more context is needed to guide effective use, making it inadequate despite annotations covering safety.

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?

The description lists two operations ('get-deploy' and 'get-deploy-for-site') but doesn't explain their parameters or semantics beyond the names. With 0% schema description coverage and 1 parameter (selectSchema) that contains nested objects for operations, the schema fully documents the structure (e.g., deployId, siteId requirements). The description adds marginal value by naming the operations, but doesn't compensate for the low coverage or provide meaning beyond what the schema specifies. Baseline is 3 as the schema handles parameter documentation.

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

Purpose3/5

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

The description states the tool performs 'Netlify read operations' and lists two specific operations (get-deploy, get-deploy-for-site), which provides a basic purpose. However, it's vague about what these operations actually do (e.g., retrieve deploy details vs. site-specific deploy info) and doesn't clearly distinguish from sibling tools like 'netlify-deploy-services-updater' beyond the 'read-only' mention. The description lacks specificity about the resource being accessed (deploy data) and the exact verb (retrieve/fetch).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions 'read operations' but doesn't explain when to choose 'get-deploy' vs. 'get-deploy-for-site', nor does it reference sibling tools like 'netlify-deploy-services-updater' for write operations or other read tools (e.g., 'netlify-project-services-reader') for different resources. Usage is implied by the operation names alone, with no explicit context or exclusions provided.

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/netlify/netlify-mcp'

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