> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keebai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/tools/{id}

> Get one webhook tool with its request shape and its parameters.

Returns one webhook tool. Same shape as an entry in [the list](/dev/endpoints/tools-list), with header and query-string values masked.

The parameters are the part worth reading: their names and descriptions are what the model sees when it decides whether to call the tool.

## Endpoint

```
GET https://api.keebai.com/v1/tools/{id}
```

## Required scope

`agents:read`

## Headers

| Header          | Required | Value                    |
| --------------- | -------- | ------------------------ |
| `Authorization` | Yes      | `Bearer kbai_pk_<token>` |

## Path parameters

| Parameter | Type     | Description             |
| --------- | -------- | ----------------------- |
| `id`      | `string` | `ObjectId` of the tool. |

## Example request

<CodeGroup>
  ```bash curl theme={"system"}
  curl https://api.keebai.com/v1/tools/6650cccc3333dddd4444eeee \
    -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```js JavaScript theme={"system"}
  const resp = await fetch(
    "https://api.keebai.com/v1/tools/6650cccc3333dddd4444eeee",
    { headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` } },
  );
  const { tool } = await resp.json();

  // The parameters are what the model fills in when it calls the tool.
  const required = tool.tool_params.filter((p) => p.required);
  ```

  ```python Python theme={"system"}
  import os, requests

  resp = requests.get(
      "https://api.keebai.com/v1/tools/6650cccc3333dddd4444eeee",
      headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
      timeout=10,
  )
  resp.raise_for_status()
  tool = resp.json()["tool"]
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={"system"}
{
  "tool": {
    "_id": "6650cccc3333dddd4444eeee",
    "name": "consultar_stock",
    "display_name": "Consultar stock",
    "description": "Devuelve el stock disponible de un SKU en el ERP.",
    "type": "webhook",
    "tool_params": [
      {
        "name": "sku",
        "description": "Código del producto",
        "type": "string",
        "required": true
      }
    ],
    "context": {
      "url": "https://erp.example.com/stock/{{sku}}",
      "method": "GET",
      "headers": { "Authorization": "***" },
      "params": {},
      "timeout": 30
    },
    "tags": ["erp"],
    "is_active": true,
    "created_at": "2026-07-22T08:12:04.221Z",
    "updated_at": "2026-07-25T16:30:19.008Z"
  }
}
```

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `agents:read` scope.

### 404 Not Found

No tool with that id in the token's company, **or** the id belongs to a tool that is not a webhook.

### 502 Bad Gateway

The agent service is unreachable.

## Operational notes

* **A non-webhook tool reads as `404`, not `403`.** An id you cannot manage is deliberately indistinguishable from one that does not exist.
* **The masked values are not a permissions thing.** Every caller sees `***`, including one with `agents:write`. The stored value is never returned by any endpoint.
* **`is_active: false` means the model will not be offered the tool**, but the configuration is intact. It is the reversible way to switch one off.
* **`type` is always `webhook`** on this surface, and is included so the field is not silently absent from a contract that upstream considers polymorphic.


## OpenAPI

````yaml GET /v1/tools/{id}
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/tools/{id}:
    get:
      tags:
        - tools
      summary: Obtener una funcion de webhook
      description: >-
        Los valores secretos de headers y query vuelven enmascarados como ***;
        las claves si se ven.
      operationId: PublicToolsController_get
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicToolEnvelopeDto'
      security:
        - PAT: []
components:
  schemas:
    PublicToolEnvelopeDto:
      type: object
      properties:
        tool:
          $ref: '#/components/schemas/PublicToolDto'
      required:
        - tool
    PublicToolDto:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        display_name:
          type: string
        description:
          type: string
        type:
          type: string
          example: webhook
        tool_params:
          type: array
          items:
            $ref: '#/components/schemas/PublicToolParamResponseDto'
        context:
          $ref: '#/components/schemas/PublicWebhookContextResponseDto'
        tags:
          type: array
          items:
            type: string
        is_active:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - _id
        - name
        - display_name
        - description
        - type
        - tool_params
        - context
        - tags
        - is_active
        - created_at
        - updated_at
    PublicToolParamResponseDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - string
            - number
            - boolean
            - array
            - object
        required:
          type: boolean
      required:
        - name
        - type
        - required
    PublicWebhookContextResponseDto:
      type: object
      properties:
        url:
          type: string
        method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
        headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Headers configurados. Las claves se muestran y los valores vuelven
            siempre como '***'.
          example:
            Authorization: '***'
        params:
          type: object
          additionalProperties:
            type: string
          description: >-
            Query string configurada, con los valores enmascarados igual que
            headers.
        body:
          type: object
          additionalProperties: true
          description: >-
            Body de la request. No se enmascara: es la plantilla que rellena el
            modelo.
        timeout:
          type: number
        response_path:
          type: string
      required:
        - url
        - method
        - headers
        - params
        - timeout
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````