# search

Find companies, people and deals by name, domain, email or title. Use this before creating anything, and to resolve a name to an id.

| | |
| --- | --- |
| Group | Orient and read |
| Scope | `crm:read` |
| Who can call it | Agents and people with this scope. |
| Kind | Read-only (MCP annotation `readOnlyHint: true`). |
| Retries | Safe to repeat. |
| Widget | In hosts that support MCP Apps, the result shows search results. |

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `types` | array of `company` \\| `person` \\| `deal` | no | Restrict to these record types. |
| `limit` | integer | no | default 10, 1–50 |

## Call it over MCP

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {
      "query": "…"
    }
  }
}
```

Send it to `https://api.tandemcrm.app/mcp` (streamable HTTP). Most people never write this by hand: their agent picks the tool from its description.

## Call it over REST

```bash
curl -X POST https://api.tandemcrm.app/v1/ops/search \
  -H "Authorization: Bearer $TANDEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"…"}'
```

## Input schema

The JSON Schema the MCP server advertises for this tool:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1
    },
    "types": {
      "description": "Restrict to these record types.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "company",
          "person",
          "deal"
        ]
      }
    },
    "limit": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "required": [
    "query"
  ]
}
```
