Capabilities

Discover read-only capabilities

Search the race-director-facing EHQ query surface available to the authenticated user. Mutations and platform-only procedures are excluded.

Method

POST

Path

/v1/capabilities/discover

Required scope

capabilities:read

Request

curl -X POST "https://api.endurancehq.app/v1/capabilities/discover" \
  -H "Authorization: Bearer $EHQ_API_KEY"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "routerKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "matches": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "path": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "const": "query"
              },
              "requiresApproval": {
                "type": "boolean",
                "const": false
              },
              "description": {
                "type": "string"
              },
              "hasDedicatedTool": {
                "type": "boolean"
              },
              "inputSchema": {
                "type": "string"
              }
            },
            "required": [
              "path",
              "kind",
              "requiresApproval",
              "description",
              "hasDedicatedTool",
              "inputSchema"
            ],
            "additionalProperties": false
          }
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "matches",
        "note"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq capabilities discover --query <keywords> [--router <router_key>]

MCP tool: ehq_capabilities_discover