Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

get_repository

Retrieve detailed information about a specific Azure DevOps repository by providing its ID or name, including project and organization details.

Instructions

Get details of a specific repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject)
organizationIdNoThe ID or name of the organization (Default: mycompany)
repositoryIdYesThe ID or name of the repository

Implementation Reference

  • MCP tool handler implementation for 'get_repository': parses arguments with schema, calls core getRepository function using connection and defaults, returns JSON-formatted repository details.
    case 'get_repository': {
      const args = GetRepositorySchema.parse(request.params.arguments);
      const result = await getRepository(
        connection,
        args.projectId ?? defaultProject,
        args.repositoryId,
      );
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Core helper function that executes the Azure DevOps API call to fetch repository details by ID or name within a project, with error handling.
    export async function getRepository(
      connection: WebApi,
      projectId: string,
      repositoryId: string,
    ): Promise<GitRepository> {
      try {
        const gitApi = await connection.getGitApi();
        const repository = await gitApi.getRepository(repositoryId, projectId);
    
        if (!repository) {
          throw new AzureDevOpsResourceNotFoundError(
            `Repository '${repositoryId}' not found in project '${projectId}'`,
          );
        }
    
        return repository;
      } catch (error) {
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
        throw new Error(
          `Failed to get repository: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema defining input validation for get_repository tool: projectId (optional), organizationId (optional), repositoryId (required).
    export const GetRepositorySchema = 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})`),
      repositoryId: z.string().describe('The ID or name of the repository'),
    });
  • Tool definition registration including name, description, and input schema for the 'get_repository' tool.
    {
      name: 'get_repository',
      description: 'Get details of a specific repository',
      inputSchema: zodToJsonSchema(GetRepositorySchema),
    },
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. It states 'Get details' but doesn't specify what details are returned, whether it's a read-only operation, or any constraints like authentication needs or rate limits. This is a significant gap for a tool with no annotation coverage.

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 a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what details are returned, how to handle the parameters beyond defaults, or differentiate from similar tools. For a tool with 3 parameters and no structured output information, this leaves critical gaps for an AI agent.

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?

The schema description coverage is 100%, with all parameters documented in the input schema. The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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

Purpose4/5

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

The description clearly states the action ('Get details') and resource ('specific repository'), making the purpose evident. However, it doesn't distinguish this tool from sibling tools like 'get_repository_details' or 'get_repository_tree', which appear to serve similar purposes, so it lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_repository_details' and 'get_repository_tree' available, there's no indication of what differentiates this tool, such as scope or output format, leaving usage context unclear.

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

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