Skip to main content
Glama

getDeployments

Retrieve a list of deployments from Vercel based on criteria like application name, project ID, timestamp range, deployment state, or team ID for efficient deployment monitoring and management.

Instructions

Lists deployments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoApplication name
fromNoTimestamp to list deployments from
limitNoLimit on number of deployments to return
projectIdNoProject ID
sinceNoTimestamp to get deployments from
slugNoSlug
stateNoDeployment state
targetNoDeployment target
teamIdNoTeam ID
toNoTimestamp to list deployments until
untilNoTimestamp to get deployments until
usersNoFilter by users

Implementation Reference

  • Core handler function that executes the logic to retrieve deployments using the Vercel SDK.
    export async function getDeployments(
    	env: Env,
    	options?: {
    		app?: string
    		from?: number
    		limit?: number
    		projectId?: string
    		target?: string
    		to?: number
    		users?: string
    		since?: number
    		until?: number
    		state?: string
    		teamId?: string
    		slug?: string
    	}
    ) {
    	const vercel = new Vercel({
    		bearerToken: env.VERCEL_API_TOKEN
    	})
    
    	const response = await vercel.deployments.getDeployments({
    		...options
    	})
    
    	return MCPResponse(response)
    }
  • src/index.ts:253-311 (registration)
    MCP server registration of the 'getDeployments' tool, including schema and wrapper handler that calls the core function.
    server.tool(
    	"getDeployments",
    	"Lists deployments",
    	{
    		app: z.string().optional().describe("Application name"),
    		from: z
    			.number()
    			.optional()
    			.describe("Timestamp to list deployments from"),
    		limit: z
    			.number()
    			.optional()
    			.describe("Limit on number of deployments to return"),
    		projectId: z.string().optional().describe("Project ID"),
    		target: z.string().optional().describe("Deployment target"),
    		to: z
    			.number()
    			.optional()
    			.describe("Timestamp to list deployments until"),
    		users: z.string().optional().describe("Filter by users"),
    		since: z
    			.number()
    			.optional()
    			.describe("Timestamp to get deployments from"),
    		until: z
    			.number()
    			.optional()
    			.describe("Timestamp to get deployments until"),
    		state: z.string().optional().describe("Deployment state"),
    		teamId: z.string().optional().describe("Team ID"),
    		slug: z.string().optional().describe("Slug")
    	},
    	async (options) => {
    		try {
    			const env = { VERCEL_API_TOKEN: apiKey }
    			const result = await getDeployments(env, options)
    			return {
    				content: [
    					{
    						type: "text",
    						text: JSON.stringify(result, null, 2)
    					}
    				]
    			}
    		} catch (error: unknown) {
    			console.error("Error getting deployments:", error)
    			const errorMessage =
    				error instanceof Error ? error.message : String(error)
    			return {
    				content: [
    					{
    						type: "text",
    						text: `Error getting deployments: ${errorMessage}`
    					}
    				]
    			}
    		}
    	}
    )
  • Zod input schema definition for the getDeployments tool parameters.
    	app: z.string().optional().describe("Application name"),
    	from: z
    		.number()
    		.optional()
    		.describe("Timestamp to list deployments from"),
    	limit: z
    		.number()
    		.optional()
    		.describe("Limit on number of deployments to return"),
    	projectId: z.string().optional().describe("Project ID"),
    	target: z.string().optional().describe("Deployment target"),
    	to: z
    		.number()
    		.optional()
    		.describe("Timestamp to list deployments until"),
    	users: z.string().optional().describe("Filter by users"),
    	since: z
    		.number()
    		.optional()
    		.describe("Timestamp to get deployments from"),
    	until: z
    		.number()
    		.optional()
    		.describe("Timestamp to get deployments until"),
    	state: z.string().optional().describe("Deployment state"),
    	teamId: z.string().optional().describe("Team ID"),
    	slug: z.string().optional().describe("Slug")
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Lists deployments' implies a read-only operation, but it doesn't address critical behaviors like pagination (implied by 'limit' parameter), authentication requirements, rate limits, or what the return format looks like. For a tool with 12 parameters and no output schema, this is a significant gap.

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 at two words ('Lists deployments'), front-loaded with the core action, and wastes no space. Every word earns its place by directly stating the tool's function without redundancy or fluff.

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 tool's complexity (12 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain the return values, filtering behavior, or how parameters interact (e.g., 'from'/'since' and 'to'/'until' duplicates), leaving the agent with insufficient context for effective use.

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%, with all 12 parameters documented in the schema (e.g., 'app', 'from', 'limit'). The description adds no additional parameter semantics beyond implying a listing action, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for gaps.

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 'Lists deployments' clearly states the verb ('Lists') and resource ('deployments'), making the basic purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'getDeployment' (singular) or 'listDeploymentFiles', leaving ambiguity about scope and specificity.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'getDeployment' (singular retrieval) and 'listDeploymentFiles' (file listing), the description offers no context about filtering capabilities, scope differences, or appropriate use cases, leaving the agent to infer usage.

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