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") },

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