{
  "name": "unstuck",
  "version": "0.2.0",
  "tools": [
    {
      "name": "whoami",
      "title": "Who am I",
      "description": "Check that the connection works and see who you are: the workspace (customer) and, for API-key calls, the key's name, prefix, scopes and expiry. Call this first when a connection seems broken.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "Who am I",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "list_signals",
      "title": "List signals",
      "description": "List the workspace's signals. Without arguments: every configured signal type with status and stats. With signal_type_code: that type's configs (id, config, frequency, status, last/next run, and run_status: the run now — queued / running / parked until resume_at — the last finished run with its outcome, and the next scheduled run) — e.g. 'keywords', 'website_intent', 'csv_upload'. Set metrics=true (optionally with since/until) to include found/qualified/enriched counts (company-signal rows also count the people found through them: profiles_found / profiles_qualified). Windows cover whole billing days (UTC-8); meta.as_of says when the counts were taken (refreshed every 10 minutes).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "signal_type_code": {
            "type": "string"
          },
          "metrics": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          }
        }
      },
      "annotations": {
        "title": "List signals",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "save_signal_config",
      "title": "Save signal config",
      "description": "Create, update, or soft-delete a signal config. Create: pass `signal_type_code` and no `id` (plan-gated; config object required). Update: pass `id` and no `signal_type_code`, with the COMPLETE merged config object (configs are stored verbatim — partial configs overwrite the rest). frequency is integer days: 0 = once, 1 = daily, 7 = weekly. Soft-delete: pass `id` + status 'deleted_by_user'. A config saved as (or left) running must carry its type's main input (e.g. keywords, authorUrl, technologies) — else signal_config_invalid names the missing `field`; save it as 'draft' to keep an incomplete one. A runner config saved running for the first time starts its first run at once (meta.first_run) — no run_signal_now needed. Read list_signals with the type code first to see the config shape of existing rows. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "signal_type_code": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "frequency": {
            "anyOf": [
              {
                "type": "number",
                "const": 0
              },
              {
                "type": "number",
                "const": 1
              },
              {
                "type": "number",
                "const": 7
              }
            ]
          },
          "max_results": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "paused",
              "draft",
              "error",
              "deleted_by_user"
            ]
          }
        }
      },
      "annotations": {
        "title": "Save signal config",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "run_signal_now",
      "title": "Run signal now",
      "description": "Enqueue an immediate run of a signal config by its id (only `running` configs of runner-type signals can be run). Pass status 'canceled_by_user' to cancel a queued run instead. The result's meta.operation says what happened: queued, requeued, already_running, queued_after_current (the config changed while a run of it is in progress — this run starts when that one ends), canceled. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "signal_config_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "canceled_by_user"
            ]
          }
        },
        "required": [
          "signal_config_id"
        ]
      },
      "annotations": {
        "title": "Run signal now",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "list_icps_and_personas",
      "title": "List ICPs and personas",
      "description": "List every ICP and Persona config in the workspace: id, code, name, status, parameters. Set metrics=true (optionally since/until) to include qualified counts. Windows cover whole billing days (UTC-8); meta.as_of says when the counts were taken (refreshed every 10 minutes).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "metrics": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          }
        }
      },
      "annotations": {
        "title": "List ICPs and personas",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "save_icp_or_persona",
      "title": "Save ICP or persona",
      "description": "Create, update, or soft-delete an ICP or Persona. Create: pass `code` (new, kebab-case) and no `id`. Update: pass `id` and no `code`. Soft-delete: pass `id` + status 'deleted_by_user'. `parameters` is the full parameter array (read the current config first and send the complete merged array). ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "icp",
              "persona"
            ]
          },
          "code": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "parameters": {
            "type": "array",
            "items": {}
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "draft",
              "deleted_by_user"
            ]
          }
        },
        "required": [
          "entity"
        ]
      },
      "annotations": {
        "title": "Save ICP or persona",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "list_audiences",
      "title": "List audiences",
      "description": "List the workspace's audiences: id, code, name, filters, member_count, status. Set metrics=true (optionally since/until) for reach/outcome metrics (incl. synced, pushes, active_destinations and the last-30-days entered/exited counts). Windows cover whole billing days (UTC-8); meta.as_of says when the counts were taken (refreshed every 10 minutes).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "metrics": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          }
        }
      },
      "annotations": {
        "title": "List audiences",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "list_audience_parameters",
      "title": "List audience filter parameters",
      "description": "The registry of filter parameters valid inside audience filters: property codes, operators, value shapes. Read this BEFORE building or editing audience filters — writes are validated against it.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "List audience filter parameters",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "save_audience",
      "title": "Save audience",
      "description": "Create, update, or soft-delete an audience. Create: pass `code` (new, kebab-case) and `name` (required, never blank) and no `id`. Update: pass `id` and no `code`. `filters` is the full filter tree — a root group {type:'group', connector:'and'|'or', children:[...]} whose children are rules {type:'rule', parameter, operator, values} referencing list_audience_parameters (see the example) — validated server-side against the registry. A signal_action value's `rules` holds signal config ids (UUIDs), never rule codes; a deleted config's id stays and its past signals count until you remove it or set ignore_deleted_rules: true on that value. enrichment_config may switch on only requestable fields. Existing members are re-evaluated by a background pass after the write (asynchronous; a large workspace takes a few minutes). ONLY call after the user explicitly confirmed the exact change.\n\nExample arguments: {\"code\":\"warm-partners\",\"name\":\"Warm partners\",\"priority\":1,\"filters\":{\"id\":\"g_1\",\"type\":\"group\",\"connector\":\"and\",\"children\":[{\"id\":\"r_1\",\"type\":\"rule\",\"parameter\":\"matches_icp\",\"operator\":\"is_any_of\",\"values\":[\"PARTNER\"]},{\"id\":\"r_2\",\"type\":\"rule\",\"parameter\":\"signal_action\",\"operator\":\"is_any_of\",\"values\":[{\"signal\":\"keywords\",\"rules\":[\"<signal_config_id>\"]}]}]},\"status\":\"running\"}",
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "filters": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "enrichment_config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "allowed_transitions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "draft",
              "deleted_by_user"
            ]
          }
        }
      },
      "annotations": {
        "title": "Save audience",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "save_audience_destination",
      "title": "Connect audience to destination",
      "description": "Create, update, or soft-delete the pairing that pushes an audience to a destination connection. Create: pass `audience_id` + `connection_id` (no `id`) and, for providers that need one, a `target` {id, type} from list_destinations(connection_id=...). Update: pass `id`. Optional routing_values / field_overrides / send_rules / release_cadence / max_per_release refine delivery. When the pairing starts (created or set 'running'), `backfill` {mode 'all' | 'recent', days for recent} also queues current members once; meta.backfill has the counts. A switched-off provider answers capability_unsupported on create and on setting a pairing running again. Soft-delete: `id` + status 'deleted_by_user'. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "audience_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "connection_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "action": {
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "routing_values": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "field_overrides": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "send_rules": {
            "description": "email_filter: 'all' (default) | 'with_email' | 'without_email' (who this destination gets; a provider needing an email offers only 'all'; omitted = kept). start_campaign_if_paused: true | false (default false; after a push, start the pair's campaign if it is paused — Prosp only; omitted = kept; the outcome is the pair's status_health / health_error)",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "release_cadence": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "max_per_release": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "draft",
              "deleted_by_user"
            ]
          },
          "backfill": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "none",
                  "all",
                  "recent"
                ]
              },
              "days": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              }
            },
            "required": [
              "mode"
            ]
          }
        }
      },
      "annotations": {
        "title": "Connect audience to destination",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "push_audience",
      "title": "Push audience to destination",
      "description": "Release an audience to its destination now, by the audience-destination pairing `id` (from list_audiences / save_audience_destination). mode 'push_now' (default) releases pending members; mode 'test' sends one lead (`lead_id`, or the first member) to verify the wiring. meta.operation reports released / nothing_to_push / test_queued / already_running. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "push_now",
              "test"
            ]
          },
          "lead_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          }
        },
        "required": [
          "id"
        ]
      },
      "annotations": {
        "title": "Push audience to destination",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "request_enrichment",
      "title": "Request enrichment",
      "description": "Find contact data — work_email, personal_email, mobile_phone — for leads the workspace holds (`lead_ids`) or for an external list (`inputs`: each a LinkedIn URL / URN / public id, an email or phone, or first_name + last_name or full_name with company_name or company_domain; nothing is saved as a lead). An external list may also ask for social_handle (the LinkedIn); people we know are answered from our records first. Asynchronous: the answer has a `request_id` and what settled at once; read the rest with get_enrichment_request. Each returned value costs its field's credits (meta.credit_estimate is the ceiling); posting a list again charges again — re-read the request instead. Retries with the same idempotency_key never charge twice. ONLY call after the user explicitly confirmed the exact change.\n\nExample arguments: {\"lead_ids\":[\"<lead uuid>\"],\"fields\":[\"work_email\"]}",
      "inputSchema": {
        "type": "object",
        "properties": {
          "lead_ids": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "inputs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "fields": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "work_email | personal_email | mobile_phone (+ social_handle for inputs)"
          },
          "source": {
            "type": "string",
            "enum": [
              "waterfalls",
              "records",
              "lead_detail",
              "api",
              "mcp",
              "cli",
              "copilot",
              "extension"
            ]
          },
          "idempotency_key": {
            "description": "repeat-safe retries; one is generated per call when omitted",
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "fields"
        ]
      },
      "annotations": {
        "title": "Request enrichment",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "get_enrichment_request",
      "title": "Get enrichment request",
      "description": "Where an enrichment request stands and what it found: status (open / completed), counts, and per item and field the status (pending / delivered / not_found / skipped / failed) with the value on delivered fields. Pass the `request_id` request_enrichment returned as `id`. External-list results are kept for 7 days, then only the statuses remain (meta.expired).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          }
        },
        "required": [
          "id"
        ]
      },
      "annotations": {
        "title": "Get enrichment request",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "search_leads",
      "title": "Search leads",
      "description": "Search and filter the workspace's leads (people). `q` matches a part of the name, company name or domain, a whole email, or a LinkedIn profile slug/URL; combine with funnel `stage` (found/qualified/enriched/synced/replied; `stage_exact`), `party`, signal types, rules, ICP/persona codes and score ranges, seniority, function, person country, audiences, engagement stages, has_email/has_phone, accounts (`company_uid`) and since/until. `ids` fetches known leads; `facets` adds value counts for seniority / function / person_country / persona. Rows carry identity (incl. person_urn), company, scores, engagement, stage, contact data with each email/phone field's search state (found / not_found / in_progress / error / not_requested) and timestamps; meta has the total and paging. To read far, pass meta.next_cursor back as `cursor` (no total on those pages).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string"
          },
          "ids": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "stage": {
            "type": "string",
            "enum": [
              "found",
              "qualified",
              "enriched",
              "synced",
              "replied"
            ]
          },
          "party": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "attribution",
                "first_party",
                "account_intent",
                "second_party",
                "third_party",
                "zero_intent"
              ]
            }
          },
          "signal": {
            "description": "signal type codes",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rule": {
            "description": "signal_config_id / signal_run_id",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "icp": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "persona": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "audience": {
            "description": "audience codes",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "engagement_stage": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "company": {
            "description": "substring on company name/domain",
            "type": "string"
          },
          "company_uid": {
            "description": "the accounts' company_uid (search_companies rows): leads at any of them",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "has_email": {
            "type": "boolean"
          },
          "has_phone": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "stage_exact": {
            "description": "with stage found/qualified/enriched: exactly that stage, not 'reached at least'",
            "type": "boolean"
          },
          "best_icp_score_min": {
            "type": "number"
          },
          "best_icp_score_max": {
            "type": "number"
          },
          "best_persona_score_min": {
            "type": "number"
          },
          "best_persona_score_max": {
            "type": "number"
          },
          "seniority": {
            "description": "e.g. director, vp, c_suite, owner_partner",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "function": {
            "description": "e.g. sales, marketing, engineering",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "person_country": {
            "description": "country name, case-insensitive",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "facets": {
            "description": "add meta.facets: value counts per seniority / function / person_country / persona",
            "type": "boolean"
          },
          "count": {
            "description": "false = skip the exact total (meta.total null) for a faster page; default true",
            "type": "boolean"
          },
          "sort": {
            "description": "<column>[.asc|.desc]: name, title, company, createdAt, lastActivity, lastSignalAt, qualifiedAt, bestIcpScore, bestPersonaScore, engagementScore, signalCount",
            "type": "string"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "page number, starts at 1"
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "rows per page (1..500)"
          },
          "cursor": {
            "description": "meta.next_cursor of the previous page (same sort); replaces page",
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Search leads",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "qualify_records",
      "title": "Qualify leads",
      "description": "Score leads the workspace ALREADY HAS against its ICPs and personas now — for leads the automatic qualification left unscored or stale; 1..500 lead ids from search_leads. It never adds anyone: new people and companies arrive through signals (a webhook signal config is the way to push them in). Each lead comes back queued, already_queued, cached (its verdict is current, so nothing runs and nothing is charged) or skipped (merged / no person identity / refused recently); results land on the lead within minutes (search_leads shows the scores). Costs qualification credits per queued lead; an id that is not the workspace's lead fails the whole call. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "lead_ids": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          }
        },
        "required": [
          "lead_ids"
        ]
      },
      "annotations": {
        "title": "Qualify leads",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "list_audience_members",
      "title": "List audience members",
      "description": "Who is in one audience, page by page — a shortcut beside search_leads (which also filters by audience code). entity 'person' (default) = the audience's leads; 'company' = their distinct companies. Each row carries qualification codes/scores. Pass meta.next_cursor back as cursor; null = last page. audience_id comes from list_audiences.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "audience_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "entity": {
            "type": "string",
            "enum": [
              "person",
              "company"
            ]
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "cursor": {
            "description": "meta.next_cursor of the previous page",
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          }
        },
        "required": [
          "audience_id"
        ]
      },
      "annotations": {
        "title": "List audience members",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "update_record_identifiers",
      "title": "Add or retract record identifiers",
      "description": "Store the workspace's OWN identifiers on its leads and companies — emails, phones, LinkedIn links, social handles, CRM ids, domains — so inbound replies and conversions match the right record (op 'add'), or take values back (op 'retract': no longer matched or sent, history kept). 1..500 records, each naming one record by exactly one key (lead_id, person_urn or person_linkedin_url for a lead; company_id or company_domain for a company) with identifiers [{type, value}]; types per docs/api/update-record-identifiers.md (aliases email, linkedin_url, website). All or nothing: a record that is not the workspace's, or an invalid value, fails the whole call. identifiers_vouched=true vouches for values with no checker — phones go to destinations only when vouched. A privacy delete is erase_record_identifiers (op 'erase'). ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add",
              "retract"
            ]
          },
          "records": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lead_id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "person_urn": {
                  "type": "string"
                },
                "person_linkedin_url": {
                  "type": "string"
                },
                "company_id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "company_domain": {
                  "type": "string"
                },
                "identifiers": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "value"
                    ]
                  }
                }
              },
              "required": [
                "identifiers"
              ]
            }
          },
          "identifiers_vouched": {
            "type": "boolean"
          }
        },
        "required": [
          "op",
          "records"
        ]
      },
      "annotations": {
        "title": "Add or retract record identifiers",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "erase_record_identifiers",
      "title": "Erase record identifiers (privacy request)",
      "description": "Privacy request: permanently DELETE the named identifiers from the workspace's leads and companies — the values brought with update_record_identifiers or a CSV upload. They cannot be brought back; the erase is written to the audit log. Same records as update_record_identifiers: 1..500, each with exactly one record key and identifiers [{type, value}] naming the values to remove. All or nothing, and it works even while adding identifiers is switched off. To stop using a value but keep its history, use update_record_identifiers with op 'retract' instead. ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "records": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lead_id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "person_urn": {
                  "type": "string"
                },
                "person_linkedin_url": {
                  "type": "string"
                },
                "company_id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "company_domain": {
                  "type": "string"
                },
                "identifiers": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "value"
                    ]
                  }
                }
              },
              "required": [
                "identifiers"
              ]
            }
          }
        },
        "required": [
          "records"
        ]
      },
      "annotations": {
        "title": "Erase record identifiers (privacy request)",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "search_companies",
      "title": "Search companies",
      "description": "Search and filter the workspace's companies (accounts). `q` matches a part of the name or domain, or a LinkedIn company page slug/URL; combine with `stage` (found/qualified; `stage_exact`), `party`, signal types, rules, ICP codes and score range, engagement stages, country, industry and a since/until window. Pass `ids` to fetch specific known companies (a merged account's id answers with the account it was merged into; meta.merged_into maps them); `facets` adds value counts for country / industry. Rows carry firmographics, lead_count, signal_count, audience codes, engagement and qualification. To read far, pass meta.next_cursor back as `cursor` (no total on those pages).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string"
          },
          "ids": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "stage": {
            "type": "string",
            "enum": [
              "found",
              "qualified"
            ]
          },
          "party": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "attribution",
                "first_party",
                "account_intent",
                "second_party",
                "third_party",
                "zero_intent"
              ]
            }
          },
          "signal": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rule": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
            }
          },
          "icp": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "engagement_stage": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "industry": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "stage_exact": {
            "description": "with stage found: no ICP fit at all",
            "type": "boolean"
          },
          "best_icp_score_min": {
            "type": "number"
          },
          "best_icp_score_max": {
            "type": "number"
          },
          "facets": {
            "description": "add meta.facets: value counts per country / industry",
            "type": "boolean"
          },
          "count": {
            "description": "false = skip the exact total (meta.total null) for a faster page; default true",
            "type": "boolean"
          },
          "sort": {
            "description": "<column>[.asc|.desc]: name, domain, createdAt, lastActivity, qualifiedAt, lastSignalAt, bestIcpScore, engagedPeopleCount, signalCount, employeeCount, foundedYear, country, industry, engagementScore",
            "type": "string"
          },
          "page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "page number, starts at 1"
          },
          "page_size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "rows per page (1..500)"
          },
          "cursor": {
            "description": "meta.next_cursor of the previous page (same sort); replaces page",
            "type": "string"
          }
        }
      },
      "annotations": {
        "title": "Search companies",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "get_insights",
      "title": "Get insights",
      "description": "Workspace performance for a window: funnel overview (leads/companies created, audience reach, distinct people and companies), per-signal-type results and outcome lanes, ICP/persona qualification counts and pairs, audience metrics, the credit ledger by action and signal type, and enrichment finds per field (asked / found / credits). `range` is 24h, 7d, 30d or all (or pass since/until); windows cover whole billing days (UTC-8) and meta.as_of says when the counts were taken. view=enrichment returns only the enrichment block (faster). Plan-gated values come back as the string 'plan_upgrade_required' instead of a number.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "range": {
            "type": "string",
            "enum": [
              "24h",
              "7d",
              "30d",
              "all"
            ]
          },
          "since": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "minLength": 4,
            "description": "ISO 8601 timestamp or YYYY-MM-DD"
          },
          "view": {
            "description": "enrichment: only the window's enrichment block",
            "type": "string",
            "enum": [
              "enrichment"
            ]
          }
        }
      },
      "annotations": {
        "title": "Get insights",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "get_billing_summary",
      "title": "Get billing summary",
      "description": "The workspace's plan and credit state: plan name, credit balance, usage this period, auto top-up, latest payment. subscription.stripe_managed=false on a paid plan means support changes or cancels it (not self-serve). balance.spendable = total minus credits reserved by running work; assigned_plan names a per-contract plan this workspace may buy. A project workspace other than the payer (billing.delegated=true) sees no balance, subscription or payments — only its plan (the payer's; null for a closed project) and its own usage.",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "Get billing summary",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "get_settings",
      "title": "Get workspace settings",
      "description": "Read the workspace settings blob (e.g. enrich_all_icp_personas, billing_auto_topup, net_new_signals_enabled, auto_join). In a project, billing_auto_topup is absent on a workspace other than the payer — its paying workspace manages top-ups (meta.billing_delegated).",
      "inputSchema": {
        "type": "object",
        "properties": {}
      },
      "annotations": {
        "title": "Get workspace settings",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "update_settings",
      "title": "Update workspace settings",
      "description": "Field-merge workspace settings: pass only the keys to change inside `settings` (unknown keys are rejected with the allowed list). Read get_settings first. enrich_all_icp_personas {<field>: boolean} may switch on only requestable fields (not social_handle). billing_auto_topup needs the owner role (role_required) and, in a project, the paying workspace (billing_delegated). auto_join {<own domain>: 'user'|'admin'|false} names exactly one confirmed email domain of an owner or admin and needs admin or above (role_required). ONLY call after the user explicitly confirmed the exact change.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "settings": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "settings"
        ]
      },
      "annotations": {
        "title": "Update workspace settings",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "list_destinations",
      "title": "List destinations",
      "description": "Destination connectors available to the workspace with the workspace's connections under each (id, name, status, health). Optional `connector` narrows to one connector code. Pass `connection_id` instead to fetch that connection's live targets (lists, sequences, etc.) — needed to create an audience-destination pairing for providers that require a target.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string"
          },
          "connection_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          }
        }
      },
      "annotations": {
        "title": "List destinations",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    }
  ]
}
