get_project
Retrieve project details from Azure DevOps by specifying project and organization identifiers to access configuration, settings, and metadata.
Instructions
Get details of a specific project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | The ID or name of the project (Default: MyProject) | |
| organizationId | No | The ID or name of the organization (Default: mycompany) |
Implementation Reference
- The getProject function implements the core logic of the 'get_project' tool by fetching the project details from Azure DevOps Core API using the project ID or name.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)}`, ); } }
- src/features/projects/index.ts:62-71 (handler)The switch case handler in handleProjectsRequest that parses arguments, calls getProject, and formats the response for the 'get_project' tool invocation.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) }], }; }
- Zod schema definition for validating the input parameters of the 'get_project' tool.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})`), });
- src/features/projects/tool-definitions.ts:19-22 (registration)Registration of the 'get_project' tool in the projectsTools array, defining its name, description, and input schema.name: 'get_project', description: 'Get details of a specific project', inputSchema: zodToJsonSchema(GetProjectSchema), },