Skip to main content
Glama

get-repositories

Retrieve repositories from an Azure DevOps project with optional links using the DevOps Enhanced MCP server. Automatically adapts to authentication context for multi-organization integration.

Instructions

Get repositories from Azure DevOps project

Input Schema

NameRequiredDescriptionDefault
includeLinksNoInclude repository links in response

Input Schema (JSON Schema)

{ "properties": { "includeLinks": { "description": "Include repository links in response", "type": "boolean" } }, "type": "object" }

Implementation Reference

  • The core handler function that executes the get-repositories tool logic. It makes an authenticated API request to the Azure DevOps '/git/repositories' endpoint, processes the response to extract key repository details, and returns a formatted JSON response.
    private async getRepositories(args: any): Promise<any> { try { const result = await this.makeApiRequest('/git/repositories?api-version=7.1'); const repositories = result.value.map((repo: any) => ({ id: repo.id, name: repo.name, url: repo.webUrl, defaultBranch: repo.defaultBranch, size: repo.size, ...(args.includeLinks && { links: repo._links }) })); return { content: [{ type: 'text', text: JSON.stringify({ count: repositories.length, repositories }, null, 2), }], }; } catch (error) { throw new Error(`Failed to get repositories: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • src/index.ts:229-241 (registration)
    Registers the 'get-repositories' tool with the MCP server in the listTools handler, providing the tool name, description, and input schema for validation.
    { name: 'get-repositories', description: 'Get repositories from Azure DevOps project', inputSchema: { type: 'object', properties: { includeLinks: { type: 'boolean', description: 'Include repository links in response', }, }, }, },
  • The switch case dispatcher in handleToolCall that routes 'get-repositories' tool calls to the specific getRepositories implementation method.
    case 'get-repositories': return await this.getRepositories(args || {});
  • The input schema definition for the get-repositories tool, specifying optional includeLinks parameter.
    inputSchema: { type: 'object', properties: { includeLinks: { type: 'boolean', description: 'Include repository links in response', }, }, },

Other Tools

Related 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/wangkanai/devops-enhanced-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server