list_organizations
Retrieve all configured Azure DevOps organizations to manage pipelines, builds, and repositories across multiple accounts without switching contexts.
Instructions
Lists all available Azure DevOps organizations from the configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/organizations.ts:10-15 (handler)Inline handler function for the list_organizations tool. Retrieves available organizations from the ConnectionManager and returns them as a formatted JSON text response.async () => { const orgs = connectionManager.getAvailableOrganizations(); return { content: [{ type: "text", text: JSON.stringify(orgs, null, 2) }], }; }
- src/tools/organizations.ts:6-16 (registration)Registration of the list_organizations tool on the MCP server, including name, description, empty input schema, and inline handler.server.tool( "list_organizations", "Lists all available Azure DevOps organizations from the configuration", {}, async () => { const orgs = connectionManager.getAvailableOrganizations(); return { content: [{ type: "text", text: JSON.stringify(orgs, null, 2) }], }; } );
- src/connection-manager.ts:30-32 (helper)Helper method in ConnectionManager that provides the list of available organizations by delegating to ConfigLoader.public getAvailableOrganizations(): string[] { return this.configLoader.getOrganizations(); }
- src/tools/index.ts:7-11 (registration)Higher-level tool registration function that invokes registerOrganizationTools (among others) to set up all tools.export function registerTools(server: McpServer, connectionManager: ConnectionManager) { registerOrganizationTools(server, connectionManager); registerPipelineTools(server, connectionManager); registerRepositoryTools(server, connectionManager); }
- src/index.ts:14-14 (registration)Top-level call to register all tools, including list_organizations indirectly via the chain.registerTools(server, connectionManager);