CircleCI · Capability

CircleCI Self-Hosted Runner API — Runner Task

CircleCI Self-Hosted Runner API — Runner Task. 2 operations. Lead operation: Get unclaimed task count. Self-contained Naftiko capability covering one Circleci business surface.

Run with Naftiko CircleciRunner Task

What You Can Do

GET
Getunclaimedtaskcount — Get unclaimed task count
/v1/runner/tasks
GET
Getrunningtaskcount — Get running task count
/v1/runner/tasks/running

MCP Tools

get-unclaimed-task-count

Get unclaimed task count

read-only idempotent
get-running-task-count

Get running task count

read-only idempotent

Capability Spec

runner-runner-task.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: CircleCI Self-Hosted Runner API — Runner Task
  description: 'CircleCI Self-Hosted Runner API — Runner Task. 2 operations. Lead operation: Get unclaimed task count. Self-contained
    Naftiko capability covering one Circleci business surface.'
  tags:
  - Circleci
  - Runner Task
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CIRCLECI_API_KEY: CIRCLECI_API_KEY
capability:
  consumes:
  - type: http
    namespace: runner-runner-task
    baseUri: https://runner.circleci.com/api/v3
    description: CircleCI Self-Hosted Runner API — Runner Task business capability. Self-contained, no shared references.
    resources:
    - name: runner-tasks
      path: /runner/tasks
      operations:
      - name: getunclaimedtaskcount
        method: GET
        description: Get unclaimed task count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource-class
          in: query
          type: string
          description: The resource class to query unclaimed tasks for
          required: true
    - name: runner-tasks-running
      path: /runner/tasks/running
      operations:
      - name: getrunningtaskcount
        method: GET
        description: Get running task count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: resource-class
          in: query
          type: string
          description: The resource class to query running tasks for
          required: true
    authentication:
      type: bearer
      token: '{{env.CIRCLECI_API_KEY}}'
  exposes:
  - type: rest
    namespace: runner-runner-task-rest
    port: 8080
    description: REST adapter for CircleCI Self-Hosted Runner API — Runner Task. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/runner/tasks
      name: runner-tasks
      description: REST surface for runner-tasks.
      operations:
      - method: GET
        name: getunclaimedtaskcount
        description: Get unclaimed task count
        call: runner-runner-task.getunclaimedtaskcount
        with:
          resource-class: rest.resource-class
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/runner/tasks/running
      name: runner-tasks-running
      description: REST surface for runner-tasks-running.
      operations:
      - method: GET
        name: getrunningtaskcount
        description: Get running task count
        call: runner-runner-task.getrunningtaskcount
        with:
          resource-class: rest.resource-class
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: runner-runner-task-mcp
    port: 9090
    transport: http
    description: MCP adapter for CircleCI Self-Hosted Runner API — Runner Task. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: get-unclaimed-task-count
      description: Get unclaimed task count
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: runner-runner-task.getunclaimedtaskcount
      with:
        resource-class: tools.resource-class
      outputParameters:
      - type: object
        mapping: $.
    - name: get-running-task-count
      description: Get running task count
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: runner-runner-task.getrunningtaskcount
      with:
        resource-class: tools.resource-class
      outputParameters:
      - type: object
        mapping: $.