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

# Tools

> Discover and execute Zero API operations through MCP.

The Zero MCP server exposes two tools: `search` discovers REST API operations, and `execute` calls one discovered operation. Together they give an agent access to the live Zero OpenAPI contract without allowing arbitrary HTTP requests.

> [!NOTE]
>
> `operation` is a Zero MCP field, not a universal MCP field. Its value comes from the OpenAPI `operationId` and uses snake\_case, such as `search_vulnerabilities` and `get_vulnerability`.

## Typical flow

1. Call `search` with the capability or entity you need.
2. Select an operation from `operations`.
3. Read its parameter, request-body, and response schemas.
4. Pass its exact `operation` name and valid inputs to `execute`.

`execute` does not accept a URL, HTTP method, credentials, or arbitrary headers. The server resolves those details from OpenAPI and forwards the authentication already associated with the MCP connection.

## `search`

Searches the current API operation catalog. Deprecated and internal system operations are excluded.

### Input schema

| Field | Type | Required | Description |
| - | - | - | - |
| `query` | string | Yes | Capability, entity, field, or operation to find. Must contain 1 to 200 characters. |
| `limit` | integer | No | Maximum matches to return, from `1` to `10`. Defaults to `5`. |

```json theme={null}
{
  "query": "search critical vulnerabilities",
  "limit": 3
}
```

### Output schema

| Field | Type | Description |
| - | - | - |
| `operations` | operation\[] | Matching operations ordered by relevance. |
| `total` | integer | Number of operations returned in this response. |

Each operation contains:

| Field | Type | Description |
| - | - | - |
| `operation` | string | Callable operation name sourced from OpenAPI `operationId`. The value uses snake\_case. |
| `method` | string | Resolved HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`. |
| `path` | string | API path, including named placeholders such as `{id}`. |
| `summary` | string | Short description of the operation. |
| `description` | string | Detailed operation behavior. |
| `tags` | string\[] | OpenAPI groups associated with the operation. |
| `parameters` | parameter\[] | Path and query parameters with their JSON schemas. |
| `requestBody` | object or null | JSON content type, required state, and resolved request schema. |
| `responseSchema` | JSON Schema or null | Resolved schema for the `200` response. |

Each parameter has `name`, `in`, `required`, `description`, and `schema`. The `in` value is `path`, `query`, or `header`; header parameters are informational because callers cannot inject arbitrary headers through `execute`.

An abridged result for a vulnerability search looks like:

```json theme={null}
{
  "operations": [
    {
      "operation": "search_vulnerabilities",
      "method": "POST",
      "path": "/vulnerabilities",
      "summary": "Search vulnerabilities",
      "description": "Search normalized vulnerability records.",
      "tags": ["Vulnerabilities"],
      "parameters": [],
      "requestBody": {
        "required": true,
        "contentType": "application/json",
        "schema": {
          "type": "object",
          "properties": {
            "q": { "type": "string" },
            "where": { "type": "object" },
            "limit": { "type": "integer", "minimum": 1, "maximum": 100 }
          }
        }
      },
      "responseSchema": {
        "type": "object",
        "required": ["data", "_meta"]
      }
    }
  ],
  "total": 1
}
```

## `execute`

Resolves and calls one operation from the catalog. The server validates path parameters, query values, and the JSON body against the operation's current OpenAPI schemas before sending the request.

### Input schema

| Field | Type | Required | Description |
| - | - | - | - |
| `operation` | string | Yes | Exact operation name returned by `search`, such as `get_vulnerability`. |
| `pathParameters` | object | When required by the path | Scalar values for placeholders such as `{id}`. |
| `query` | object | No | Query parameters. Values may be strings, numbers, booleans, or arrays of those scalar types. |
| `body` | JSON | When required by the operation | JSON request body matching `requestBody.schema`. |

Search for critical, known-exploited vulnerabilities:

```json theme={null}
{
  "operation": "search_vulnerabilities",
  "body": {
    "where": {
      "logical_operator": "and",
      "conditions": [
        { "field": "cvss", "operator": "gte", "value": 9 },
        { "field": "cisa_kev", "operator": "equals", "value": true }
      ]
    },
    "sort": "updated",
    "order": "desc",
    "limit": 20
  }
}
```

Retrieve one vulnerability with optional projections:

```json theme={null}
{
  "operation": "get_vulnerability",
  "pathParameters": {
    "id": "CVE-2021-44228"
  },
  "query": {
    "include": ["overview", "risk", "remediation"]
  }
}
```

### Output schema

| Field | Type | Description |
| - | - | - |
| `operation` | string | Operation that was executed. |
| `status` | integer | REST API HTTP status code. |
| `headers` | object | Selected response headers. Header names are lowercase. |
| `body` | JSON | Parsed REST API response body. |
| `truncated` | boolean | Whether the body exceeded the MCP response limit. |

```json theme={null}
{
  "operation": "get_vulnerability",
  "status": 200,
  "headers": {
    "content-type": "application/json; charset=utf-8",
    "x-request-id": "req_01JZDLK8F4N6Y2QW9P3M7C5H1A"
  },
  "body": {
    "entity": "vulnerability",
    "id": "CVE-2021-44228",
    "title": "Apache Log4j2 remote code execution"
  },
  "truncated": false
}
```

## Validation and errors

* An unknown `operation` fails before any API request is sent.
* Missing path parameters or a required body fail schema validation locally.
* Invalid parameter and body values return a validation error describing the rejected field.
* REST API responses with status `400` or higher retain their Problem Details body and are marked as MCP errors.
* Response bodies larger than 512 KiB are truncated and return `truncated: true`.

Use the returned request ID when correlating an API error with logs or support.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.