Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

list_repositories

Retrieve all Git repositories within a specified Azure DevOps project and organization, with an option to include reference links.

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

  • The main handler function that executes the 'list_repositories' tool logic. It uses the Azure DevOps WebApi Git API to call getRepositories with the provided projectId and includeLinks options.
    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 for the 'list_repositories' tool input. Defines optional projectId, organizationId, and includeLinks fields with default values from environment config.
    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'),
    });
  • TypeScript interface for ListRepositoriesOptions, used as the options parameter type in the handler function.
    export interface ListRepositoriesOptions {
      projectId: string;
      includeLinks?: boolean;
    }
  • Registration of 'list_repositories' as a ToolDefinition with name, description, and inputSchema. Part of the repositoriesTools array.
    {
      name: 'list_repositories',
      description: 'List repositories in a project',
      inputSchema: zodToJsonSchema(ListRepositoriesSchema),
    },
  • The request handler case for 'list_repositories' which parses input with ListRepositoriesSchema, defaults projectId, calls listRepositories, and returns JSON-serialized result.
    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, the description bears full responsibility for behavioral disclosure. It does not mention read-only nature, pagination, authentication requirements, or any side effects. The description is too minimal to inform the agent about operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no filler. It is efficiently structured and front-loaded, though it may be too brief for completeness. It earns its place but could benefit from more detail.

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 tool has no output schema and three optional parameters, the description lacks information about return values, pagination, or filtering behavior. For a listing tool, more context on what is listed and how results are presented is needed.

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 input schema has 100% description coverage, so each parameter is already documented. The description adds no additional meaning beyond what the schema provides, meeting the baseline for adequate semantic support.

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

Purpose3/5

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

The description 'List repositories in a project' clearly states verb and resource, but it is vague and does not distinguish from sibling tools like 'get_all_repositories_tree' or 'get_repository_details' which also deal with listing repositories. The lack of specificity on scope or filtering reduces clarity.

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. There is no mention of prerequisites, when to prefer it over other repository listing tools, or what the tool does not do. The description offers no context for decision-making.

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