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

# Negocios

> Referencia de las herramientas de Negocios del MCP de xcale: qué hace cada una, si cambia algo y qué necesita.

*Generada del código que corre en producción — no editar. Los nombres, títulos y descripciones de las herramientas están en inglés en todos los idiomas.*

## `get_pipeline`

**Get the deals pipeline**

Read this account's deals pipeline: its stages (id, label, kind open/won/lost, milestone) and the fields a deal carries (key, label, type, options). Read it first: move\_deal takes a stage id from here and create\_deal and update\_deal take field keys from here. pipeline is null when the account has not created one; creating it is done in the dashboard.

Solo lectura · Idempotente: Sí

Sin entradas.

## `search_deals`

**Search deals**

Search the deals of this account: by stage, by kind of stage (open, won, lost), by contact, by days stuck in their stage (minDaysInStage), by text in the title (q, 2 to 80 characters) or by days since they closed. With no filter it lists the deals of every stage that is not archived. Paged: pass nextCursor back as cursor. count and totals (money per currency) cover everything the filter reaches, not only the page.

Solo lectura · Idempotente: Sí

**Entradas**

| Nombre | Tipo | Obligatoria | Descripción |
| - | - | - | - |
| `stageId` | string | No | |
| `kind` | string | No | Una de: open, won, lost |
| `contactId` | string | No | |
| `minDaysInStage` | integer | No | |
| `q` | string | No | |
| `closedWithinDays` | integer | No | |
| `limit` | integer | No | |
| `cursor` | string | No | |

## `get_deal`

**Get a deal**

Read one deal and its history: the stage it is in and since when, its value, expected date and fields, and the last 20 changes of stage (newest first) with who made each, through which door, and why. A change made through a connection names it in grant.clientName.

Solo lectura · Idempotente: Sí

**Entradas**

| Nombre | Tipo | Obligatoria | Descripción |
| - | - | - | - |
| `dealId` | string | Sí | |

## `create_deal`

**Create a deal**

Create a deal for a contact, in the first open stage unless stageId says another. Name the contact with contactId, or declare a person with contact \{email, phone, name} (at least an email or a phone) when they are not in the account yet. fields are by the keys get\_pipeline shows, each of the type it declares. reason (1 to 500 characters) is recorded in the deal history. idempotencyKey (8 to 128 characters, yours to choose) makes a retry safe: the same key answers the deal the first call made instead of a second one. What you write is recorded as written by this person through this connection.

Escritura · Idempotente: Sí

**Entradas**

| Nombre | Tipo | Obligatoria | Descripción |
| - | - | - | - |
| `contactId` | string | No | |
| `contact` | object | No | |
| `title` | string | Sí | |
| `stageId` | string | No | |
| `amountMinor` | integer | No | |
| `currency` | string | No | |
| `expectedAt` | string | No | |
| `fields` | object | No | |
| `reason` | string | Sí | |
| `idempotencyKey` | string | Sí | |

Entradas anidadas, como JSON Schema:

```json theme={null}
{
  "contact": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string"
      },
      "phone": {
        "type": "string"
      },
      "name": {
        "type": "string"
      }
    },
    "additionalProperties": false
  },
  "fields": {
    "type": "object",
    "additionalProperties": {
      "type": [
        "string",
        "number",
        "boolean",
        "null"
      ]
    }
  }
}
```

## `update_deal`

**Edit a deal**

Edit a deal: its title, value (amountMinor with currency), expected date (YYYY-MM-DD) and fields by the keys get\_pipeline shows. Only what you name is written; null clears an optional value. It does not change the stage: that is move\_deal. Pass expectedUpdatedAt (the deal updatedAt you read) to refuse the edit if someone changed the deal since. What you write is recorded as written by this person through this connection.

Escritura · Idempotente: No

**Entradas**

| Nombre | Tipo | Obligatoria | Descripción |
| - | - | - | - |
| `dealId` | string | Sí | |
| `title` | string | No | |
| `amountMinor` | integer \| null | No | |
| `currency` | string \| null | No | |
| `expectedAt` | string \| null | No | |
| `fields` | object | No | |
| `expectedUpdatedAt` | string | No | |

Entradas anidadas, como JSON Schema:

```json theme={null}
{
  "fields": {
    "type": "object",
    "additionalProperties": {
      "type": [
        "string",
        "number",
        "boolean",
        "null"
      ]
    }
  }
}
```

## `move_deal`

**Move a deal to another stage**

Move a deal to another stage. toStageId is a stage id from get\_pipeline; expectedStageId is the stage the deal is in as you last read it: if someone moved it since, the move is refused with stale\_stage and details.currentStageId says where it is now, so read it again and decide. reason (1 to 500 characters) is recorded in the deal history. The move is recorded as made by this person through this connection.

Escritura · Idempotente: No

**Entradas**

| Nombre | Tipo | Obligatoria | Descripción |
| - | - | - | - |
| `dealId` | string | Sí | |
| `toStageId` | string | Sí | |
| `expectedStageId` | string | Sí | |
| `reason` | string | Sí | |


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