Skip to main content
Glama

get_project

Retrieve detailed information about a specific project in Azure DevOps using the project ID or name, enabling streamlined access to project data through the MCP server.

Instructions

Get details of a specific project

Input Schema

NameRequiredDescriptionDefault
projectIdYesThe ID or name of the project

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "projectId": { "description": "The ID or name of the project", "type": "string" } }, "required": [ "projectId" ], "type": "object" }

Implementation Reference

  • The main handler function that executes the tool logic: retrieves the project details from Azure DevOps Core API using the project ID or name, handles errors appropriately.
    export async function getProject( connection: WebApi, projectId: string, ): Promise<TeamProject> { try { const coreApi = await connection.getCoreApi(); const project = await coreApi.getProject(projectId); if (!project) { throw new AzureDevOpsResourceNotFoundError( `Project '${projectId}' not found`, ); } return project; } catch (error) { if (error instanceof AzureDevOpsError) { throw error; } throw new Error( `Failed to get project: ${error instanceof Error ? error.message : String(error)}`, ); } }
  • Zod schema defining the input parameters for the get_project tool: optional projectId and organizationId with descriptions.
    export const GetProjectSchema = z.object({ projectId: z .string() .optional() .describe(`The ID or name of the project (Default: ${defaultProject})`), organizationId: z .string() .optional() .describe(`The ID or name of the organization (Default: ${defaultOrg})`), });
  • Tool definition registration for the 'get_project' MCP tool, including name, description, and input schema.
    { name: 'get_project', description: 'Get details of a specific project', inputSchema: zodToJsonSchema(GetProjectSchema), },
  • Request handler registration in the projects feature router: parses arguments with schema and invokes the getProject handler.
    case 'get_project': { const args = GetProjectSchema.parse(request.params.arguments); const result = await getProject( connection, args.projectId ?? defaultProject, ); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], };

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/Tiberriver256/mcp-server-azure-devops'

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