TeamCity · Capability

TeamCity REST API — Agent Pools

TeamCity REST API — Agent Pools. 4 operations. Lead operation: Get All Agent Pools. Self-contained Naftiko capability covering one Teamcity business surface.

Run with Naftiko TeamcityAgent Pools

What You Can Do

GET
Getallagentpools — Get All Agent Pools
/v1/agentpools
POST
Createagentpool — Create Agent Pool
/v1/agentpools
GET
Getagentpool — Get Agent Pool
/v1/agentpools/{agentpoollocator}
DELETE
Deleteagentpool — Delete Agent Pool
/v1/agentpools/{agentpoollocator}

MCP Tools

get-all-agent-pools

Get All Agent Pools

read-only idempotent
create-agent-pool

Create Agent Pool

get-agent-pool

Get Agent Pool

read-only idempotent
delete-agent-pool

Delete Agent Pool

idempotent

Capability Spec

rest-agent-pools.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TeamCity REST API — Agent Pools
  description: 'TeamCity REST API — Agent Pools. 4 operations. Lead operation: Get All Agent Pools. Self-contained Naftiko
    capability covering one Teamcity business surface.'
  tags:
  - Teamcity
  - Agent Pools
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TEAMCITY_API_KEY: TEAMCITY_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-agent-pools
    baseUri: https://{server}/app/rest
    description: TeamCity REST API — Agent Pools business capability. Self-contained, no shared references.
    resources:
    - name: agentPools
      path: /agentPools
      operations:
      - name: getallagentpools
        method: GET
        description: Get All Agent Pools
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createagentpool
        method: POST
        description: Create Agent Pool
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: agentPools-agentPoolLocator
      path: /agentPools/{agentPoolLocator}
      operations:
      - name: getagentpool
        method: GET
        description: Get Agent Pool
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: agentPoolLocator
          in: path
          type: string
          required: true
      - name: deleteagentpool
        method: DELETE
        description: Delete Agent Pool
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: agentPoolLocator
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.TEAMCITY_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-agent-pools-rest
    port: 8080
    description: REST adapter for TeamCity REST API — Agent Pools. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/agentpools
      name: agentpools
      description: REST surface for agentPools.
      operations:
      - method: GET
        name: getallagentpools
        description: Get All Agent Pools
        call: rest-agent-pools.getallagentpools
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createagentpool
        description: Create Agent Pool
        call: rest-agent-pools.createagentpool
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/agentpools/{agentpoollocator}
      name: agentpools-agentpoollocator
      description: REST surface for agentPools-agentPoolLocator.
      operations:
      - method: GET
        name: getagentpool
        description: Get Agent Pool
        call: rest-agent-pools.getagentpool
        with:
          agentPoolLocator: rest.agentPoolLocator
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteagentpool
        description: Delete Agent Pool
        call: rest-agent-pools.deleteagentpool
        with:
          agentPoolLocator: rest.agentPoolLocator
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-agent-pools-mcp
    port: 9090
    transport: http
    description: MCP adapter for TeamCity REST API — Agent Pools. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-all-agent-pools
      description: Get All Agent Pools
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-agent-pools.getallagentpools
      outputParameters:
      - type: object
        mapping: $.
    - name: create-agent-pool
      description: Create Agent Pool
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-agent-pools.createagentpool
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-agent-pool
      description: Get Agent Pool
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-agent-pools.getagentpool
      with:
        agentPoolLocator: tools.agentPoolLocator
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-agent-pool
      description: Delete Agent Pool
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-agent-pools.deleteagentpool
      with:
        agentPoolLocator: tools.agentPoolLocator
      outputParameters:
      - type: object
        mapping: $.