Skip to main content
Glama

listDeploymentFiles

Retrieve and view deployment files using a deployment ID with Vercel MCP. Access specific files associated with a deployment for streamlined management and troubleshooting.

Instructions

Lists deployment files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deploymentIdYesThe ID of the deployment
slugNoSlug
teamIdNoTeam ID

Implementation Reference

  • Core handler function that lists files for a Vercel deployment using the Vercel SDK and formats the response.
    export async function listDeploymentFiles(
    	env: Env,
    	deploymentId: string,
    	options?: {
    		teamId?: string
    		slug?: string
    	}
    ) {
    	const vercel = new Vercel({
    		bearerToken: env.VERCEL_API_TOKEN
    	})
    
    	const response = await vercel.deployments.listDeploymentFiles({
    		id: deploymentId,
    		...options
    	})
    
    	return MCPResponse(response)
    }
  • Zod input schema defining parameters for the listDeploymentFiles tool.
    {
    	deploymentId: z.string().describe("The ID of the deployment"),
    	teamId: z.string().optional().describe("Team ID"),
    	slug: z.string().optional().describe("Slug")
    },
  • src/index.ts:175-209 (registration)
    Registers the listDeploymentFiles tool with the MCP server using server.tool, including description, schema, and error-handling wrapper that calls the core handler.
    server.tool(
    	"listDeploymentFiles",
    	"Lists deployment files",
    	{
    		deploymentId: z.string().describe("The ID of the deployment"),
    		teamId: z.string().optional().describe("Team ID"),
    		slug: z.string().optional().describe("Slug")
    	},
    	async ({ deploymentId, ...options }) => {
    		try {
    			const env = { VERCEL_API_TOKEN: apiKey }
    			const result = await listDeploymentFiles(env, deploymentId, options)
    			return {
    				content: [
    					{
    						type: "text",
    						text: JSON.stringify(result, null, 2)
    					}
    				]
    			}
    		} catch (error: unknown) {
    			console.error("Error listing deployment files:", error)
    			const errorMessage =
    				error instanceof Error ? error.message : String(error)
    			return {
    				content: [
    					{
    						type: "text",
    						text: `Error listing deployment files: ${errorMessage}`
    					}
    				]
    			}
    		}
    	}
    )
  • Utility function used by handlers to format API responses as MCP-compatible content blocks.
    export function MCPResponse(data: unknown) {
    	return {
    		content: [
    			{
    				type: "text",
    				text:
    					typeof data === "string"
    						? data
    						: JSON.stringify(data, null, 2)
    			}
    		]
    	}
    }
Behavior2/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 but only states the action without details on permissions, pagination, rate limits, or output format. It fails to address whether this is a read-only operation or has other behavioral traits, leaving significant gaps.

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 extremely concise with a single sentence, 'Lists deployment files', which is front-loaded and wastes no words. However, this conciseness comes at the cost of completeness, but for this dimension alone, it scores high due to efficient structure.

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 no annotations, no output schema, and a tool with three parameters (one required), the description is incomplete. It doesn't explain what the tool returns, how to interpret results, or behavioral aspects, making it inadequate for effective agent use despite the schema covering parameters.

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 three parameters. The description adds no meaning beyond the schema, such as explaining parameter relationships or usage context. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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

Purpose2/5

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

The description 'Lists deployment files' is a tautology that merely restates the tool name 'listDeploymentFiles' without adding specificity. It doesn't clarify what type of files are listed, their format, or the scope of the listing, making it minimally informative beyond the obvious.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives like 'getDeploymentFileContents' or 'getDeployment'. The description lacks context about prerequisites, such as needing a deployment ID, or distinctions from sibling tools, leaving usage ambiguous.

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

Related 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/zueai/vercel-api-mcp'

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