ONE deal:get
← Receivers

deal:get

deal family

mcp

Reads one deal by its id in the caller's own workspace (or a client workspace the caller controls). A deal id from another workspace answers not_found, the same as an id that never existed

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_actors
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/deal:get \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "tid": "01a2b3c4d5e6f7" }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • tid string required
  • workspace string optional A client workspace to read; only one the caller controls. Defaults to the caller's own

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • deal object
  • error string unauthenticated | no_db | forbidden | not_found

Traffic

Every call to deal:get, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names deal:get, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 1
  • one.ie/web/src/lib/receiver-index.generated.ts:155
CLI 2
  • packages/cli/src/lib/receivers-index.generated.ts:157
  • packages/cli/src/lib/receivers.generated.ts:157
→

Answered by

deal:get one.ie/web/src/lib/resolvers/deals.ts:86 Dispatched through POST /api/ask/deal:get, after the envelope validates the payload.

deal family · 3 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "tid": {
      "type": "string"
    },
    "workspace": {
      "description": "A client workspace to read; only one the caller controls. Defaults to the caller's own",
      "type": "string"
    }
  },
  "required": [
    "tid"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "deal": {
      "type": "object",
      "properties": {
        "tid": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "contact": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "won",
            "lost"
          ]
        },
        "value_cents": {
          "type": "number"
        },
        "currency": {
          "type": "string"
        },
        "lost_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "close_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage_changed_at": {
          "type": "number"
        },
        "created_at": {
          "type": "number"
        },
        "won_at": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "tid",
        "title",
        "contact",
        "stage",
        "status",
        "value_cents",
        "currency",
        "lost_reason",
        "close_date",
        "stage_changed_at",
        "created_at",
        "won_at"
      ]
    },
    "error": {
      "description": "unauthenticated | no_db | forbidden | not_found",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}