Skip to main content
Glama

list_agents

Retrieve and filter build agents from TeamCity with pagination support, enabling efficient management of CI/CD infrastructure.

Instructions

List build agents (supports pagination)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoFetch all pages up to maxPages
fieldsNoOptional fields selector for server-side projection
locatorNoOptional agent locator to filter
maxPagesNoMax pages to fetch (when all=true)
pageSizeNoItems per page (default 100)

Implementation Reference

  • The handler function that executes the logic to list all TeamCity agents by calling the underlying AgentApi.getAllAgents() and returning the data.
    async listAgents() { const response = await this.agents.getAllAgents(); return response.data; }
  • Registration of the listAgents method in the TeamCityClientAdapter interface implementation, delegating to the API client's listAgents.
    ) => api.downloadBuildLog<T>(buildId, requestOptions), getBuildStatistics: (buildId, fields) => api.getBuildStatistics(buildId, fields), listChangesForBuild: (buildId, fields) => api.listChangesForBuild(buildId, fields), listSnapshotDependencies: (buildId) => api.listSnapshotDependencies(buildId), listVcsRoots: (projectId) => api.listVcsRoots(projectId), listAgents: () => api.listAgents(), listAgentPools: () => api.listAgentPools(), baseUrl: resolvedApiConfig.baseUrl,
  • Type definition (schema) for the listAgents method in the TeamCityClientAdapter interface.
    listAgents: () => Promise<unknown>;

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/Daghis/teamcity-mcp'

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