Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

list_projects

Retrieve all Azure DevOps projects in an organization with filtering options for state, pagination, and continuation tokens to manage large project lists.

Instructions

List all projects in an organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdNoThe ID or name of the organization (Default: mycompany)
stateFilterNoFilter on team project state (0: all, 1: well-formed, 2: creating, 3: deleting, 4: new)
topNoMaximum number of projects to return
skipNoNumber of projects to skip
continuationTokenNoGets the projects after the continuation token provided

Implementation Reference

  • The core handler function that lists Azure DevOps projects using the Core API, handling options and errors.
    export async function listProjects(
      connection: WebApi,
      options: ListProjectsOptions = {},
    ): Promise<TeamProject[]> {
      try {
        const coreApi = await connection.getCoreApi();
        const projects = await coreApi.getProjects(
          options.stateFilter,
          options.top,
          options.skip,
          options.continuationToken,
        );
    
        return projects;
      } catch (error) {
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
        throw new Error(
          `Failed to list projects: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema for validating input parameters to the list_projects tool.
    export const ListProjectsSchema = z.object({
      organizationId: z
        .string()
        .optional()
        .describe(`The ID or name of the organization (Default: ${defaultOrg})`),
      stateFilter: z
        .number()
        .optional()
        .describe(
          'Filter on team project state (0: all, 1: well-formed, 2: creating, 3: deleting, 4: new)',
        ),
      top: z.number().optional().describe('Maximum number of projects to return'),
      skip: z.number().optional().describe('Number of projects to skip'),
      continuationToken: z
        .number()
        .optional()
        .describe('Gets the projects after the continuation token provided'),
    });
  • Tool definition registration including name, description, and input schema for the list_projects tool.
      name: 'list_projects',
      description: 'List all projects in an organization',
      inputSchema: zodToJsonSchema(ListProjectsSchema),
    },
  • Request handler dispatch case that parses arguments with schema and calls the listProjects handler.
    case 'list_projects': {
      const args = ListProjectsSchema.parse(request.params.arguments);
      const result = await listProjects(connection, {
        stateFilter: args.stateFilter,
        top: args.top,
        skip: args.skip,
        continuationToken: args.continuationToken,
      });
      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?

No annotations are provided, so the description carries full burden. It states it 'List all projects' but doesn't disclose behavioral traits like pagination behavior (implied by skip/top parameters), rate limits, authentication requirements, or whether it returns partial/full data. The description is minimal and lacks operational context.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a list operation. Every word earns its place without being overly terse.

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?

For a list tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'projects' entail, return format, pagination behavior, or error conditions. The agent must rely heavily on schema inference, leaving gaps in operational understanding.

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 schema fully documents all 5 parameters. The description adds no parameter-specific information beyond implying organization filtering. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't enhance understanding of parameter interactions.

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 ('List') and resource ('projects in an organization'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_project' or 'get_project_details', which might retrieve single projects rather than lists.

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. It doesn't mention when to prefer 'list_projects' over 'get_project' or 'get_project_details', nor does it specify prerequisites like needing organization access. Usage context is implied but not stated.

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