Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

list_repositories

Retrieve a list of repositories within an Azure DevOps project to manage and access source code collections.

Instructions

List repositories in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject)
organizationIdNoThe ID or name of the organization (Default: mycompany)
includeLinksNoWhether to include reference links

Implementation Reference

  • Core handler function that executes the list_repositories tool logic: connects to Azure DevOps Git API and retrieves repositories for the given project.
    export async function listRepositories(
      connection: WebApi,
      options: ListRepositoriesOptions,
    ): Promise<GitRepository[]> {
      try {
        const gitApi = await connection.getGitApi();
        const repositories = await gitApi.getRepositories(
          options.projectId,
          options.includeLinks,
        );
    
        return repositories;
      } catch (error) {
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
        throw new Error(
          `Failed to list repositories: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema defining the input parameters for the list_repositories tool: projectId, organizationId, includeLinks.
    export const ListRepositoriesSchema = 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})`),
      includeLinks: z
        .boolean()
        .optional()
        .describe('Whether to include reference links'),
    });
  • Tool registration in the repositoriesTools array, specifying name, description, and input schema.
    {
      name: 'list_repositories',
      description: 'List repositories in a project',
      inputSchema: zodToJsonSchema(ListRepositoriesSchema),
    },
  • Dispatcher/registration in handleRepositoriesRequest switch statement that parses args and invokes the listRepositories handler.
    case 'list_repositories': {
      const args = ListRepositoriesSchema.parse(request.params.arguments);
      const result = await listRepositories(connection, {
        ...args,
        projectId: args.projectId ?? defaultProject,
      });
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions listing repositories but fails to describe key behaviors such as pagination, sorting, default limits, error handling, or authentication requirements. This leaves significant gaps for a tool that likely interacts with a version control system.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy for an agent to parse quickly.

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 insufficient for a tool with three parameters and likely complex behavior in a version control context. It doesn't explain return values, error conditions, or operational constraints, leaving the agent under-informed about how to effectively use this tool.

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%, so the input schema fully documents the three parameters (projectId, organizationId, includeLinks). The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline score of 3 for high schema coverage.

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 verb ('List') and resource ('repositories in a project'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'get_all_repositories_tree' or 'get_repository', which might offer similar functionality with different scopes or details.

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 such as 'get_all_repositories_tree' or 'get_repository'. The description lacks context about prerequisites, filtering options, or typical use cases, leaving the agent to infer usage from the tool name alone.

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