---
slug: atomic-tools-reference
title: "Atomic tools reference: what they do, every contract, and the Apple surface"
kind: reference
status: published
hash: 2098894bb72e370f2c406f94f9b529d39655d252a368d25619ada3889b65c058
created: 2026-10-09T05:31:37.000Z
updated: 2026-10-09T06:27:34.529Z
summary: "The atomic tools (CODE, WEB, COMPUTER, RESULT, ARTICLE, APPLE) with every invocation contract, the Alfred and internet helpers, the 8,914-verb Apple ontology, Supabase/cf/Wrangler coverage, and a comparison with programmatic tool calling."
tags: ["atomic-tools","contracts","apple","reference"]
above: ["[[atomic-tooling]]"]
below: []
adjacent: ["[[directory-ledger-pattern]]"]
nested: []
---
# Atomic tools reference: what they do, every contract, and the Apple surface

*The atomic tools (CODE, WEB, COMPUTER, RESULT, ARTICLE, APPLE) with every invocation contract, the Alfred and internet helpers, the 8,914-verb Apple ontology, Supabase/cf/Wrangler coverage, and a comparison with programmatic tool calling.*

## What changed today, and what is still open

**APPLE is in the Directory** (Pending your “ship”). I added a row named `APPLE` to the production Directory. It is one atomic tool over all 8,914 Mac and iPhone verbs: `op=schema|summary|layer|search|verb|run|compose|rows|result`. Its code is written (`src/tools/computer.js`, plus its MCP schema in `src/r2-build.js`) but not deployed. Until it ships, calling `APPLE` answers “no way that reaches a service”. I did not deploy because `deploy.mjs` ships the whole working folder, and other sessions are editing that folder right now.

**What your MCP sends by default** (Grok). Plain `/api/mcp` sends all 1,582 rows (about 1.2 MB) and leaves out `find`, `call` and `CONTRACTS`. `?tools=CODE,WEB,COMPUTER,RESULT,ARTICLE,APPLE` sends those six plus the three helpers. Making that the default is a 3-line change in `src/mcp.js`, also pending a deploy.

**Supabase has zero Directory rows** (Gap). The build runs on Supabase, but no Directory row reaches it: not the CLI, not the Management API, not SQL. Cloudflare has 200 `CF_*` rows plus `CLI_CF` and `CLI_WRANGLER`.

## What you said about these tools

Taken from your own messages in the session transcripts on this Mac (Oct 1 – Oct 9). Each line says whether the build does it now.

| When | Your idea | State in the build |
|---|---|---|
| Oct 1 | One higher-order **REST** tool, as in your Google Apps Script build: any POST, any GET, instead of 200 tools per API that are never called. Filters for worked/failed, execution method, category; risk tiers per row. | **[Partly]** `/api/run {tool,args}` is the one REST door for every row. The 1,582 rows themselves still exist one per action. |
| Oct 1 | Atomic flows so models get more fluid computer use. | **[Built]** `COMPUTER` runs a whole declared procedure in one call. |
| Oct 5 | `{tool: web, scrape, return, fallback: 3 \| false}`: one tool that moves to the next source when blocked, reports line health when nothing works, and limits what it returns (“if char > 1000 then extract json, limit 999”). | **[Built]** `WEB` has a fixed fallback table (`smart`), `verify.contains`, and `return.select / max_bytes / mode`. **[Missing]** no numeric `fallback: n` and no automatic line-health report. |
| Oct 5 | A model that forgets the schema says `confidence: low`, and that routes the call to a model that checks or corrects it. A value in a receipt triggers review. | **[Not built]** The atomic tools call no model by design. Nothing reads a confidence field. |
| Oct 5 | A failed payload should run logic that resolves it (or calls a model), instead of being shown to the model. Mine the Ledger for each tool's payloads from smallest to largest, list the failures, and add one fallback rule at a time. Your Sheets “Scripts API” tool ran 13 steps in order. | **[Partly]** Failures are kept whole on the Ledger and `RESULT` can grep them. No job mines them into rules, and only `WEB` and `CODE` grep have fallbacks. |
| Oct 5 | One atomic script for coding: “POST this here, then wrangler deploy”, without 50 bash calls. | **[Built]** `CODE op=ship` applies changes and deploys in one detached call. |
| Oct 5 | **Memory:** when context passes a set percentage, a cheap model condenses it into a short essay so the agent can keep going indefinitely. The condenser must not be the coding model. | **[Task agent only]** `src/r2-task-agent.js` has a memory checkpoint that condenses history into `{exact_state, summary, refs}` and keeps the source. The atomic tools have no memory and no context-percentage trigger. |
| Oct 5 | The task agent rolls through the task ledger, babysits coding agents, spawns a memory-cleanup pass. “Skills” only as boolean logic injected per situation (if this, then push this action sequence). | **[Task agent only]** `conditionalInstructions` injects rules when facts hold (`has_task`, `has_error`, `cleanup_pending`). |
| Oct 5 | Recursive find: “find x” bounces through the code until it resolves. One REST tool with complications covers read, write, edit, delete. A shorthand schema so models don't escape JSON. The fewest words and variables, “an onion of intuitive complexity”. | **[Not built]** `CODE` contract: `semantic_recursive_search: false`, “no additional positional shorthand”. |
| Oct 5 | Automatic screenshots and video as proof of work. | **[Not built]** `screenshot_capture: false`, `video_capture: false`. |
| Oct 5 | Return only what changed; make every blockage return the exact next invocation; subscribe instead of polling; a tiny working register outside the conversation; compile successful recoveries into reusable paths. | **[Partly]** `full_ref` and `job_ref` are next invocations. `COMPUTER` keeps verified routes in a graph and replays them. No subscribe, no change-only returns, no working register. |
| Oct 5 | A smart model supervises while cheap models do the clicking; recursive scripts gather evidence for answers that must be exact. | **[Partly]** `COMPUTER` runs declared steps with no model and returns `needs_plan` when it is stuck, so a supervisor can supply the next rule. No cheap-model clicker is wired. |
| Oct 5 | The screen as JSON from a few background tabs of the browser you already have open. Use Safari through Alfred, other browsers too, Alfred Remote on the phone, app and folder actions, Alfred's default web searches. Develop Cloudflare or Supabase locally through the tunnel. | **[Built for web]** `PAGE_JSON` and `SITE_SEARCH` read pages as JSON from a background Safari tab via an Alfred trigger. **[Not in COMPUTER]** `COMPUTER` drives its own isolated Playwright browser. It does not use Alfred, AppleScript or Safari. |
| Oct 8 | Inventory every iOS/Mac invocation, ordered by ontology, inside the build. One search bar; typing “imessage” finds iMessage send and the App Intents, with every contract and an Invoke button. | **[Live]** Console → Directory → “Mac & iPhone” chip, 8,914 verbs. **[Today]** `APPLE` row added; code waits on deploy. |
| Oct 9 | Compound tools are programmatic tool calling in reverse. Use cheap models for lead enrichment, so writing the email is one model call. | See the comparison tab. |

## CODE: Coding on the build folder

Reads, searches, edits and writes files in ~/misc-sheets with a hash check on every change, checks syntax, checks grammar through LanguageTool, and runs deploys as detached jobs. Each change is validated, staged outside the build, written through write.mjs against the hash you read, then re-read to confirm.

Runs: `Worker → Mac bridge (agent.miscsubjects.com/exec) → coding-tool.mjs → write.mjs` · models called: 0

| op | What it does |
|---|---|
| `schema` | its own input schema and return contract |
| `grep` | ripgrep over the workspace; literal fallback if rg is missing |
| `read` | the file with its canonical hash and line slice (offset, limit) |
| `edit` | exact old→new replacements; refused if base_hash is stale or an anchor is missing or appears twice |
| `write` | whole content; base_hash required if the file exists |
| `check` | syntax (JS/JSON) now, or tests as a detached job |
| `grammar` | LanguageTool check of text; no rewrite |
| `deploy` | detached: waits for any running deploy, runs deploy.mjs, probes verify_paths |
| `ship` | detached: applies changes in order, then deploys; stops at the first failure |
| `job` | status of a detached job |
| `result` | the stored whole outcome by ref or job_id |

**Minimum call**

```json
{
  "op": "read",
  "path": "src/mcp.js"
}
```

**Maximum call**

```json
{
  "op": "ship",
  "changes": [
    {
      "op": "edit",
      "path": "src/mcp.js",
      "base_hash": "sha256:\u2026",
      "edits": [
        [
          "old text",
          "new text"
        ]
      ]
    },
    {
      "op": "write",
      "path": "web/x.html",
      "content": "\u2026"
    }
  ],
  "verify_paths": [
    "/api/health",
    "/api/tools"
  ],
  "return": {
    "select": [
      "data",
      "receipt",
      "steps"
    ],
    "max_bytes": 4000,
    "mode": "selected"
  }
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `op` | enum of 11 | always |
| `path` | string, inside the build root | read, edit, write, check |
| `pattern / regex / ignore_case` | string; regex default false | grep |
| `offset / limit` | integer ≥ 1 / ≥ 0 | read (optional) |
| `base_hash` | sha256 from read | edit/write of an existing file |
| `edits` | [[old,new], …], ≥ 1 pair | edit |
| `content` | string | write |
| `kind / paths` | syntax | tests; test file list | check |
| `changes` | [{op, path, base_hash, edits | content}] | ship |
| `verify_paths` | /api/… GET paths; default /api/health | deploy, ship |
| `job_id / ref` | uuid / coding/results/<uuid>.json | job, result |
| `text / language` | string; default en-US | grammar |
| `return` | select default [data, receipt] | optional |

**When it fails.** Stale hash → status stale, nothing written. Missing or duplicate anchor → failed before write. Invalid syntax → write refused. A failed ship step stops the rest; earlier writes stay (no rollback). A failed live probe after a deploy → failed, though the deploy may already be live.

**What it does not do.** No recursive semantic search, no rollback, no multi-file transaction, no retries except the grep fallback, no screenshots, no stall alerts, no memory cleanup.

## WEB: The internet, from your own line

Searches, reads pages and searches named sites. It applies a fixed fallback table, checks that literal text appears on the pages, stores everything, and returns citations and counts unless you ask for more.

Runs: `Worker → LINE_SEARCH (Mac bridge net helper on Starlink) + PAGE_JSON (Alfred → background Safari tab) + SITE_SEARCH` · models called: 0

| op | What it does |
|---|---|
| `search` | LINE_SEARCH results, then PAGE_JSON reads the top `read` URLs in Safari; if search fails and smart is on, SITE_SEARCH google |
| `read` | PAGE_JSON on one URL; if it fails and smart is on, LINE_SEARCH read (marked partial) |
| `search with site / template / domain` | SITE_SEARCH on that site; on failure, read the constructed URL |
| `sites` | the site registry (23 named sites) |
| `discover` | find a domain's search URL from OpenSearch or schema.org SearchAction |
| `result` | the stored whole outcome |
| `schema` | the execution contract |

**Minimum call**

```json
{
  "q": "starlink obstruction map"
}
```

**Maximum call**

```json
{
  "op": "search",
  "query": "starlink obstruction map",
  "count": 10,
  "read": 5,
  "smart": true,
  "verify": {
    "contains": [
      "obstruction"
    ]
  },
  "return": {
    "select": [
      "citations",
      "verification",
      "counts"
    ],
    "max_bytes": 2000,
    "mode": "selected"
  }
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `op` | schema | search | read | sites | discover | result | optional; read if url, else search |
| `q / query` | string | search |
| `url` | http(s) | read |
| `site / template / domain` | named site, https template with {query}, or a domain | site search |
| `count` | 1–10, default 5 | search |
| `read` | 0–5, default 3 | search |
| `smart` | boolean, default true: use the fallback table | optional |
| `verify.contains` | array of literal strings | optional |
| `ref` | web/results/<uuid>.json | result |
| `return` | default select: citations, counts, verification, step_statuses, models_called, data | optional |

**When it fails.** Search fails → SITE_SEARCH google with the same query. Page read fails → LINE_SEARCH read (text may be partial, marked complete:false). Verification fails → status verification_failed with all evidence; never claims completion.

**What it does not do.** No clicks or submissions. A finite fallback table, no open-ended recursion. No line-health report. Needs the Mac online with Safari and Alfred running.

## COMPUTER: Browser procedures

Runs a whole browser procedure in one call: steps or conditional rules, targets found by visible label and role, done_when and verify checks. It acts and verifies with no model between steps, records a graph of states and verified transitions, and replays known routes.

Runs: `Worker → Mac bridge → mac/computer.mjs → isolated persistent Playwright browser (not your Chrome or Safari)` · models called: 0

| op | What it does |
|---|---|
| `see` | a semantic snapshot of the page |
| `run` | steps or rules until done_when and verify match, or a named stop |
| `map` | read each listed same-origin URL without changing the main page |
| `result` | the stored whole outcome |
| `schema` | its contract |

**Minimum call**

```json
{
  "op": "see",
  "url": "https://example.com"
}
```

**Maximum call**

```json
{
  "op": "run",
  "session": "crm",
  "url": "https://app.example.com",
  "steps": [
    {
      "do": "fill",
      "target": {
        "text": "Email",
        "role": "textbox"
      },
      "value": "a@b.com",
      "expect": {
        "control": {
          "text": "Save",
          "role": "button"
        }
      }
    }
  ],
  "rules": [
    {
      "when": {
        "text": "Cookie"
      },
      "do": "click",
      "target": {
        "text": "Reject",
        "role": "button",
        "exact": true
      },
      "expect": {
        "text": "Dashboard"
      }
    }
  ],
  "done_when": {
    "url": "/dashboard"
  },
  "verify": {
    "text": "Saved"
  },
  "wait_ms": 10000,
  "return": {
    "fields": [
      "final_state",
      "graph_index"
    ],
    "max_bytes": 3000,
    "mode": "selected"
  }
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `op` | schema | see | run | map | result | always |
| `session` | string; the persistent profile | optional |
| `url / urls` | start URL / map list | see, run, map |
| `steps / rules` | [{do: click|fill|press|navigate, target{text, role, exact, within}, value, key, url, expect, when}] | run |
| `done_when / verify` | text, url or control predicate | run |
| `wait_ms` | ≥ 0, default 10000 (UI wait only) | optional |
| `ref` | computer/results/<uuid>.json | result |
| `return` | fields default: session, executor, models_called, final_state, graph_index | optional |

**When it fails.** Stops with a named outcome: done, ambiguous, target_missing, needs_plan, exhausted, stalled, transition_failed, action_failed, verification_failed. No speculative retry and no rollback.

**What it does not do.** No AppleScript, no Alfred, no native desktop control, no screenshots, no planner. It does not use the browser you are signed in to.

## RESULT: Reading back any earlier answer

Returns a counted slice of anything already on the Ledger: every row of one call, the lines that match a pattern, a byte range, or one value at a JSON path. Every answer states the whole size and how much it returned.

Runs: `Worker → the Ledger door (/api/ledger/row/<seq>)` · models called: 0

| op | What it does |
|---|---|
| `{call_id}` | every row of one call, named columns only |
| `{call_id, grep}` | matching lines with line numbers and 120 characters either side |
| `{call_id, from, to}` | a byte range of that payload |
| `{call_id, json}` | one value at a dotted path, e.g. results.0.url |
| `{grep}` | scan the newest payload rows for the words; up to 8 MB scanned |
| `{tail, before}` | the rows older than a cursor |

**Minimum call**

```json
{
  "grep": "error"
}
```

**Maximum call**

```json
{
  "call_id": "f692c6a3-\u2026",
  "seq": 12345,
  "grep": "/timeout|refused/i",
  "rows": 50
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `call_id` | uuid | slicing one call |
| `grep` | words, or /regex/flags | grep forms |
| `from / to` | byte offsets ≥ 0; window 64,000 if to is missing | byte range |
| `json` | dotted path | one value |
| `seq` | one row of the call | optional |
| `rows / limit` | rows to scan, default 20 | grep, tail |
| `tail / before` | cursor walk, up to 50 pages | tail |

**When it fails.** Unknown call_id → says no rows and suggests {grep}. Invalid regex → the engine's own message. Binary payload → says so and gives its address.

**What it does not do.** Read-only. No op field and no return policy; the form is chosen by which fields you send.

## ARTICLE: Articles on miscsubjects.com

Seventeen operations over JSON articles. Reads return the hash and changes require it. publish writes against the hash, fetches and hashes every source, and publishes only when every quote is found on its page.

Runs: `Worker → the jarticles door, in process` · models called: 0

| op | What it does |
|---|---|
| `list / read / at / grep` | find and read; at reads one path, grep searches one or all |
| `create / replace / patch / delete` | writes; replace, patch and delete need if_match |
| `verify` | fetch and hash every source, check every quote |
| `publish` | write + verify + publish in one call |
| `comment / cli / theme / theme_patch / models` | comments, the Obsidian commands, the shared theme |
| `result / schema` | stored outcome; the schema and article schema |

**Minimum call**

```json
{
  "op": "list"
}
```

**Maximum call**

```json
{
  "op": "publish",
  "slug": "atomic-tooling",
  "article": {
    "slug": "atomic-tooling",
    "title": "\u2026",
    "body": [
      "\u2026"
    ],
    "sources": []
  },
  "if_match": "sha256:\u2026",
  "publish_when": "all_quotes_found",
  "return": {
    "select": [
      "data.page",
      "data.sources"
    ],
    "max_bytes": 3000,
    "mode": "selected"
  }
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `op` | enum of 17 | always |
| `slug` | string | read, at, patch, delete, verify, comment |
| `article` | the whole jarticle/1 object | create, replace, publish |
| `ops` | [{op: set|merge|delete|append|insert|move, path, value}] | patch, theme_patch |
| `if_match` | hash from read | changing an existing article |
| `path / q / flags` | path; regex | at; grep, list |
| `publish_when` | all_quotes_found (default) | always | never | publish |
| `comment / cli` | objects | comment, cli |
| `ref / return` | article/results/<uuid>.json; policy | result; optional |

**When it fails.** A failed step stops publish and names the step. If any quote is missing, the article stays a draft and the answer lists which sources failed.

**What it does not do.** No model call. Nothing published unless every quote is found, unless you pass publish_when: always.

## APPLE: The Mac and the paired iPhone (8,914 verbs)

**[New · not deployed]** New today, waiting on a deploy. One tool for every verb in the Apple catalog: app scripting dictionaries, App Intents, Shortcuts actions and triggers, every CLI tool, preference domains, live menus and windows (iPhone Mirroring included), phone protocols, private iMessage verbs, Continuity, the build's own Apple rows and composed tools.

Runs: `Worker → /api/surface → Mac: mac/surface-verbs.py (search, layers) and mac/surface-run.py (run, compose)` · models called: 0

| op | What it does |
|---|---|
| `search` | verbs by words; each hit has an id and a run block |
| `verb` | one verb whole |
| `run` | fire a verb by id on the Mac or the phone; receipted on the Ledger |
| `layer` | page one of the 13 layers |
| `compose` | make a shortcut, launchd automation or chain from verbs |
| `summary / rows` | catalog summary; the build's own Apple rows and their state |
| `result / schema` | stored outcome; the schema |

**Minimum call**

```json
{
  "op": "search",
  "q": "imessage send"
}
```

**Maximum call**

```json
{
  "op": "run",
  "id": "v_2992029c22",
  "args": {
    "args": "-productVersion"
  },
  "timeout": 60,
  "return": {
    "select": [
      "data"
    ],
    "max_bytes": 2000,
    "mode": "selected"
  }
}
```

| Field | Type and range | Needed for |
|---|---|---|
| `op` | enum of 9 | always |
| `q` | words | search |
| `id` | v_… from search | verb, run |
| `args` | shaped as the verb's run.args | run |
| `timeout` | seconds | run (optional) |
| `layer / offset / limit` | one of 13; limit ≤ 2000, default 500 | layer |
| `kind / name / steps / spec` | shortcut | automation | chain | compose |
| `ref / return` | apple/results/<uuid>.json; policy | result; optional |

**When it fails.** Unknown op or field → refused with the schema. A door that fails → ok:false with its HTTP status and error; the whole answer is still stored.

**What it does not do.** The catalog was compiled on Sep 22. 155 of the 201 build rows were never run successfully. App Intents work only once a shortcut wraps them.

## Computer, Alfred and your internet

You asked for Alfred, AppleScript and JavaScript to be part of COMPUTER. Today they are separate tools. COMPUTER drives its own Playwright browser. The Alfred and Safari pieces are wired into WEB, not COMPUTER.

**LINE_SEARCH** (no model, $0 per call). Search and read from your Starlink line through the Mac's bridge net helper. No fee per call.
Fields: query; mode search | search_read | read; count 1–10 (5); read 1–5 (3); url | urls ≤ 5; max_chars 200–60,000 (6,000); highlights (true); engines

```json
{"query": "med spa Scottsdale"}
{"query": "med spa Scottsdale", "mode": "search_read", "count": 10, "read": 5, "max_chars": 60000, "highlights": true, "engines": ["duckduckgo"]}
```

**PAGE_JSON** (no model, $0 per call). Reads one page as JSON in a background Safari tab of your own front window, through the Alfred workflow com.cyrus.linesearch (trigger pagejson). Sites you are signed in to answer as you.
Fields: url (http/https)

```json
{"url": "https://example.com"}
{"url": "https://example.com"}
```

**SITE_SEARCH** (no model, $0 per call). Alfred's web-search registry as JSON, read in your Safari: google, images, maps, translate, gmail, drive, x, wiki, amazon, imdb, ebay, bing, yahoo, ask, linkedin, youtube, facebook, flickr, wolfram, duck, rotten, pinterest, reddit. It can also use any https template with {query}, or find a domain's own search URL (Alfred's “Lookup”).
Fields: op sites | discover; site | template | domain; query

```json
{"site": "wiki", "query": "starlink"}
{"domain": "example.com", "query": "pricing"}
```

**SITE_SCRAPE** (no model, $0 per call). Reads a whole site page by page in headless Chromium on the Mac and saves pages, documents, contacts, dates and money to ~/Downloads/scrapes/.
Fields: url; pages 1–100 (15); depth 0–4 (2); under_path; download

```json
{"url": "https://example.com"}
{"url": "https://example.com", "pages": 100, "depth": 4, "under_path": true, "download": true}
```

**ALFRED** (no model, $0 per call). Lists every external trigger of your Alfred workflows, and runs one with an argument. Only allowed workflows run (com.cyrus.linesearch plus the setting alfred-allowed-workflows). Alfred does not return a workflow's output; read what the workflow writes.
Fields: op list | run; workflow (bundle id); trigger; argument ≤ 2,000 chars

```json
{"op": "list"}
{"op": "run", "workflow": "com.cyrus.linesearch", "trigger": "pagejson", "argument": "json:\u2026"}
```

**Alfred's own scripting verbs** (from the Apple catalog; run with `APPLE {op:"search", q:"alfred"}` then `{op:"run", id}`):

| Verb | What it does |
|---|---|
| `search` | Show Alfred with the given text — direct: text |
| `action` | Show Alfred actions for the given file — parameters: as type — direct: list of text |
| `browse` | Show Alfred file system navigation for given path — direct: text |
| `run trigger` | Run Alfred workflow trigger — parameters: in workflow, with argument — direct: text |
| `reload workflow` | Reload Workflow with given UID (folder name) or Bundle ID — direct: text |
| `reveal workflow` | Reveal Workflow with given UID (folder name) or Bundle ID — parameters: configuration, details — direct: text |
| `set configuration` | Modify workflow configuration value, or set environment variable — parameters: to value, in workflow, exportable — direct: text |
| `remove configuration` | Revert workflow configuration value to default, or delete environment variable — parameters: in workflow — direct: text |
| `set theme` | Change theme in Alfred — direct: text |

```text
WEB ─ search ─▶ LINE_SEARCH (Mac net helper, Starlink) ─▶ top URLs ─▶ PAGE_JSON ─▶ ALFRED trigger pagejson ─▶ background Safari tab ─▶ JSON
   └ fallback ─▶ SITE_SEARCH google (Safari)          └ fallback ─▶ LINE_SEARCH read (partial text)
COMPUTER ─▶ mac/computer.mjs ─▶ isolated Playwright profile (not Safari, not Chrome, no Alfred, no AppleScript)
APPLE ─▶ /api/surface ─▶ AppleScript/JXA · App Intents · Shortcuts · CLI · defaults · UI scripting · iPhone
```

To make COMPUTER what you described: add `op: "mac"` to COMPUTER, delegating to APPLE (AppleScript, JXA, UI scripting, Shortcuts, Alfred `run trigger`), and a `browser: "safari"` option that uses the PAGE_JSON path for reading. Neither exists yet.

## Apple: every verb, by layer and ontology

8,914 verbs in 13 layers, compiled from this Mac and the paired iPhone on 2026-09-22. Ontology: observe (read state), act (change something), trigger (an event that starts work), compose (build new verbs), record (where proof lands).

| Layer | Device | Verbs | observe | act | trigger | compose | record | Runs when |
|---|---|---|---|---|---|---|---|---|
| app scripting | mac | 2,325 | 936 | 1389 |  |  |  | live (2325) |
| app intents | mac + iphone | 472 | 117 | 355 |  |  |  | live once a shortcut wraps it (472) |
| shortcuts actions | mac + iphone | 402 |  |  |  | 402 |  | live once a shortcut wraps it (402) |
| shortcuts triggers | iphone, iphone + mac | 62 |  |  | 62 |  |  | live once the automation is created on the device (38); live once created (24) |
| cli tools | mac | 2,480 |  | 2480 |  |  |  | live (subject to the grants the command needs) (2480) |
| defaults domains | mac | 497 | 497 |  |  |  |  | live (497) |
| ui scripting | iphone (through the mirrored window), mac | 2,055 | 21 | 2034 |  |  |  | live while the app runs (2054); live when iPhone Mirroring is connected (1) |
| iphone device | iphone | 197 | 66 | 131 |  |  |  | live when the phone is paired (developer mode for the developer group) (174); live when the phone is paired (23) |
| private imessage | mac | 181 | 14 | 167 |  |  |  | theoretical without SIP off (139); private_api (SIP is on here) (42) |
| continuity | both | 14 |  | 14 |  |  |  | live (4); live via UI scripting (3); live once a shortcut wraps it (3); live when connected (1); theoretical to automate (1); live (open tel://) (1) |
| build rows | cloud, iphone, mac | 201 | 105 | 96 |  |  |  | 🟡 untested (155); 🟢 works (30); 🔴 broken (16) |
| observation points | both, iphone, mac | 18 |  |  |  |  | 18 | live (18) |
| composed | mac (+ phone through its steps), mac + iphone (iCloud sync) | 10 |  |  |  | 10 |  | live (9); imported? not seen in shortcuts list (1) |

### app scripting (2,325)

every scriptable app's AppleScript/JXA dictionary (sdef): its commands and object classes

Apps: Microsoft Word (606), Microsoft Excel (578), System Events (121), Microsoft Outlook (117), Music (57), Finder (57), Keynote (50), TV (45), Mail (43), Xcode (38), Numbers (37), Pages (34), Automator (33), iTerm (32), Script Editor (32), Image Events (29), ChatGPT (28), Google Chrome (28), Database Events (28), System Information (26), GarageBand (25), iMovie (25), Contacts (25), Preview (25), TextEdit (25), Automator Application Stub (25), Photos (24), VoiceOver (22), QuickTime Player (20), Terminal (17), Calendar (15), Safari (13), Alfred 5 (9), Messages (7), Notes (6), System Settings (5), Reminders (4), Hammerspoon (3), Shortcuts (3), Shortcuts Events (3), Bluetooth File Exchange (2), Console (1), Screen Sharing (1), FolderActionsDispatcher (1)

### app intents (472)

App Intents metadata shipped inside apps: the verbs Siri, Shortcuts and Spotlight can run, on Mac and iPhone

Apps: Notes (57), Remote+ (49), Podcasts (35), Mail (34), Books (30), Freeform (26), News (24), Shortcuts (24), VoiceMemos (24), Journal (20), Preview (19), Finder (17), TaskForge (15), Home (12), Screenshot (8), Weather (7), WindowManager (7), ControlCenter (6), FindMy (5), WhatsApp (5), Print Center (4), Reminders (4), Microsoft Word (4), Microsoft Excel (4), WallpaperAgent (4), Photos (3), App Store (3), Numbers (3), Microsoft Outlook (3), Keynote (3), Pages (3), Console (3), Tips (2), Messages (1), Calculator (1), Clock (1), Dock (1), PeopleViewService (1)

### shortcuts actions (402)

the built-in Shortcuts action identifiers found in the system cache

Apps: Shortcuts (402)

### shortcuts triggers (62)

the Shortcuts automation triggers: the phone's observable events

Apps: Shortcuts (62)

WFAirplaneModeTrigger · WFAlarmTrigger · WFAlertTrigger · WFAppInBackgroundTrigger · WFAppInFocusTrigger · WFArriveLocationTrigger · WFBatteryLevelTrigger · WFBinaryTrigger · WFBluetoothTrigger · WFCarPlayConnectionTrigger · WFConfiguredTrigger · WFCoreDataTrigger · WFDNDTrigger · WFDescriptionForAutoJoinTrigger · WFDiskMountTrigger · WFEmailTrigger · WFExternalDisplayTrigger · WFFileTrigger · WFFilesystemTrigger · WFFolderTrigger · WFIsAutoJoinRetryTrigger · WFLeaveLocationTrigger · WFLocationTrigger · WFLowPowerModeTrigger · WFMessageTrigger · WFNFCTrigger · WFPassTypeToLocalizedDescriptionWithTrigger · WFPlugInTrigger · WFPredictedLocationTransitionTrigger · WFRunSelectionForTrigger · WFSleepTrigger · WFSoundRecognitionTrigger · WFStageManagerTrigger · WFTimeOfDayTrigger · WFUserFocusActivityTrigger · WFWalletTransactionTrigger · WFWifiTrigger · WFWorkoutTrigger · time of day · alarm · sleep (wind down / wake up) · arrive at a location · leave a location · before commute · email received · message received · Wi-Fi network joined/left · Bluetooth device connected · NFC tag · app opened/closed · battery level · charger connected/disconnected · sound recognition · transaction (Apple Pay / Wallet) · Focus turned on/off · CarPlay connected · airplane mode · do not disturb · low power mode · screen time limit · Apple Watch workout · Siri request

### cli tools (2,480)

every command with a manual page on this Mac

### defaults domains (497)

every preference domain: readable, writable, observable state

### ui scripting (2,055)

the menu bars and windows of the running apps, walked live, including the iPhone Mirroring window

Apps: Google Chrome (155), Finder (142), Preview (133), iMovie (130), Music (118), Script Editor (117), Terminal (114), Messages (112), System Settings (98), Automator (98), TextEdit (95), GarageBand (92), 1Password (91), Activity Monitor (83), Shortcuts (83), Claude (82), ChatGPT (79), Kimi (64), System Information (58), AdsPower Global (58), iPhone Mirroring (53)

### iphone device (197)

what the Mac can do to the paired phone over the device protocols

Apps: pymobiledevice3 lockdown (21), devicectl device (17), pymobiledevice3 profile (14), pymobiledevice3 developer (13), pymobiledevice3 mounter (13), pymobiledevice3 crash (11), pymobiledevice3 apps (10), pymobiledevice3 remote (10), pymobiledevice3 backup2 (9), pymobiledevice3 diagnostics (7), pymobiledevice3 restore (7), pymobiledevice3 springboard (7), pymobiledevice3 afc (6), pymobiledevice3 cryptex (6), pymobiledevice3 provision (5), pymobiledevice3 webinspector (5), pymobiledevice3 activation (4), pymobiledevice3 bonjour (4), pymobiledevice3 amfi (3), pymobiledevice3 notification (3), pymobiledevice3 syslog (3), pymobiledevice3 idam (3), devicectl manage (3), pymobiledevice3 processes (2), pymobiledevice3 usbmux (2), devicectl list (2), pymobiledevice3 state (1), pymobiledevice3 btlogger (1), pymobiledevice3 companion (1), pymobiledevice3 pcap (1), pymobiledevice3 power-assertion (1), pymobiledevice3 version (1), devicectl diagnose (1)

### private imessage (181)

the private IMCore verbs (the iMessage executor's rpc methods and the helper's selectors)

Apps: IMCore selector (139), Messages (IMCore) (42)

### continuity (14)

what the Mac and the phone can do to each other through Apple's own bridges

Apps: iPhone Mirroring (1), Universal Clipboard (1), Handoff (1), Continuity Camera (1), Phone calls relay (1), SMS / RCS relay (1), AirDrop (1), AirPlay (1), Sidecar (1), iCloud sync (1), Find My (1), Apple Watch / HomePod / Apple TV (1), Wallet / Apple Pay (1), Siri (1)

iPhone Mirroring · Universal Clipboard · Handoff · Continuity Camera · Phone calls relay · SMS / RCS relay · AirDrop · AirPlay · Sidecar · iCloud sync · Find My · Apple Watch / HomePod / Apple TV · Wallet / Apple Pay · Siri

### build rows (201)

the build's own directory rows for this surface, with their measured state

Apps: BLOOIO (65), DCAP (37), IMSG (35), PHONE (22), MAC (12), APPLE (10), IMESSAGE (7), DEVICE (4), STARLINK (4), HOME (3), BLOOIO2 (1), TEXT (1)

| Row | State |
|---|---|
| `APPLE_BLUETOOTH` | 🟢 works |
| `APPLE_CALENDAR` | 🟡 untested |
| `APPLE_CONTACTS` | 🟡 untested |
| `APPLE_INVENTORY` | 🟢 works |
| `APPLE_JXA` | 🟡 untested |
| `APPLE_LAYERS` | 🟢 works |
| `APPLE_MAIL` | 🟡 untested |
| `APPLE_NOTES` | 🟡 untested |
| `APPLE_SAFARI_JS` | 🟡 untested |
| `<KEY>` | 🟡 untested |
| `BLOOIO` | 🟡 untested |
| `BLOOIO2` | 🟢 works |
| `BLOOIO_ADD_CONTACT_IDENTITY` | 🟡 untested |
| `BLOOIO_ADD_CONTACT_TAGS` | 🟡 untested |
| `BLOOIO_ADD_REACTION` | 🟡 untested |
| `BLOOIO_BATCH_LOOKUP_PHONE_NUMBERS` | 🟡 untested |
| `BLOOIO_CONTACT_CAPABILITIES` | 🟡 untested |
| `BLOOIO_CREATE_CHAT` | 🟡 untested |
| `BLOOIO_CREATE_CONTACT` | 🟡 untested |
| `BLOOIO_CREATE_GROUP` | 🟡 untested |
| `BLOOIO_CREATE_WEBHOOK` | 🟡 untested |
| `BLOOIO_DELETE_CONTACT` | 🟡 untested |
| `BLOOIO_DELETE_GROUP` | 🟡 untested |
| `BLOOIO_DELETE_WEBHOOK` | 🟡 untested |
| `BLOOIO_FINISH` | 🟡 untested |
| `BLOOIO_GET_CHANNEL` | 🟡 untested |
| `BLOOIO_GET_CHANNEL_CAPABILITIES` | 🟡 untested |
| `BLOOIO_GET_CHAT` | 🟡 untested |
| `BLOOIO_GET_CHAT_BACKGROUND` | 🟡 untested |
| `BLOOIO_GET_CONTACT` | 🟡 untested |
| `BLOOIO_GET_CONTACT_CAPABILITIES` | 🟡 untested |
| `BLOOIO_GET_CONTACT_TIMELINE` | 🟡 untested |
| `BLOOIO_GET_EVENT` | 🟡 untested |
| `BLOOIO_GET_GROUP` | 🟡 untested |
| `BLOOIO_GET_LOCATION_CONTACT` | 🟡 untested |
| `BLOOIO_GET_MESSAGE` | 🟡 untested |
| `BLOOIO_GET_MESSAGE_STATUS` | 🟡 untested |
| `BLOOIO_GET_POLL_RESULTS` | 🟡 untested |
| `BLOOIO_GET_WEBHOOK` | 🟡 untested |
| `BLOOIO_LIST_CHANNELS` | 🟡 untested |
| `BLOOIO_LIST_CHATS` | 🟡 untested |
| `BLOOIO_LIST_CHAT_MESSAGES` | 🟡 untested |
| `BLOOIO_LIST_CONTACTS` | 🟢 works |
| `BLOOIO_LIST_CONTACT_IDENTITIES` | 🟡 untested |
| `BLOOIO_LIST_CONTACT_TAGS` | 🟡 untested |
| `BLOOIO_LIST_EVENTS` | 🟡 untested |
| `BLOOIO_LIST_GROUPS` | 🟡 untested |
| `BLOOIO_LIST_GROUP_MEMBERS` | 🟡 untested |
| `BLOOIO_LIST_LOCATION_CONTACTS` | 🟡 untested |
| `BLOOIO_LIST_MESSAGE_EVENTS` | 🟡 untested |
| `BLOOIO_LIST_NUMBERS` | 🟡 untested |
| `BLOOIO_LIST_WEBHOOKS` | 🟡 untested |
| `BLOOIO_LIST_WEBHOOK_DELIVERIES` | 🟡 untested |
| `BLOOIO_LOGS_TAIL` | 🟢 works |
| `BLOOIO_LOOKUP_PHONE_NUMBER` | 🟡 untested |
| `BLOOIO_MARK_CHAT_READ` | 🟡 untested |
| `BLOOIO_ME` | 🟡 untested |
| `BLOOIO_REFRESH_LOCATION_CONTACTS` | 🟡 untested |
| `BLOOIO_REMOVE_CHAT_BACKGROUND` | 🟡 untested |
| `BLOOIO_REMOVE_CONTACT_IDENTITY` | 🟡 untested |
| `BLOOIO_REMOVE_CONTACT_TAG` | 🟡 untested |
| `BLOOIO_REMOVE_GROUP_ICON` | 🟡 untested |
| `BLOOIO_REPLAY_WEBHOOK_DELIVERY` | 🟡 untested |
| `BLOOIO_ROTATE_WEBHOOK_SECRET` | 🟡 untested |
| `BLOOIO_SEND_CHAT_MESSAGE` | 🟡 untested |
| `BLOOIO_SEND_MESSAGE` | 🟡 untested |
| `BLOOIO_SEND_POLL` | 🟡 untested |
| `BLOOIO_SET_TYPING` | 🟡 untested |
| `BLOOIO_SHARE_CONTACT_CARD` | 🟡 untested |
| `BLOOIO_TURN_PHASE_A` | 🟡 untested |
| `BLOOIO_UPDATE_CHANNEL_PROFILE` | 🟡 untested |
| `BLOOIO_UPDATE_CHAT` | 🟡 untested |
| `BLOOIO_UPDATE_CONTACT` | 🟡 untested |
| `BLOOIO_UPDATE_GROUP` | 🟡 untested |
| `BLOOIO_UPDATE_WEBHOOK` | 🟡 untested |
| `BLOOIO_VOTE_POLL` | 🟡 untested |
| `DCAP_APP_ACT_CALENDAR_COUNT` | 🟡 untested |
| `DCAP_APP_ACT_FINDER` | 🟡 untested |
| `DCAP_APP_ACT_IPHONE` | 🟡 untested |
| `DCAP_APP_ACT_MUSIC` | 🟡 untested |
| `DCAP_APP_ACT_VOLUME` | 🟡 untested |
| `DCAP_DEVICE_EXEC_MAC` | 🟡 untested |
| `DCAP_PROCEDURE_RUN_SHORTCUTS` | 🟡 untested |
| `DCAP_PROCEDURE_RUN_TIME` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_ADDRESSBOOK` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_BLUETOOTHFILEEXCHANGE` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_CONSOLE` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_ICAL` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_IWORK_KEYNOTE` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_IWORK_NUMBERS` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_IWORK_PAGES` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_MAIL` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_MOBILESMS` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_MUSIC` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_NOTES` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_PHOTOS` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_QUICKTIMEPLAYERX` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_REMINDERS` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_SAFARI` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_SCREENSHARING` | 🟡 untested |
| `DCAP_READ_APP_COM_<KEY>S` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_SYSTEMPREFERENCES` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_TERMINAL` | 🟡 untested |
| `DCAP_READ_APP_COM_APPLE_TV` | 🟡 untested |
| `DCAP_READ_APP_COM_GOOGLECODE_ITERM2` | 🟡 untested |
| `DCAP_READ_APP_COM_GOOGLE_CHROME` | 🟡 untested |
| `DCAP_READ_APP_COM_MICROSOFT_EXCEL` | 🟡 untested |
| `DCAP_READ_APP_COM_MICROSOFT_OUTLOOK` | 🟡 untested |
| `DCAP_READ_APP_COM_MICROSOFT_WORD` | 🟡 untested |
| `DCAP_READ_APP_COM_OPENAI_CODEX` | 🟡 untested |
| `DCAP_READ_APP_COM_RUNNINGWITHCRAYONS_ALFRED` | 🟡 untested |
| `DCAP_READ_APP_ORG_HAMMERSPOON_HAMMERSPOON` | 🟡 untested |
| `DCAP_READ_HTTP_CLAUDE_AI_API_ACCOUNT_PROFILE` | 🟡 untested |
| `DEVICE_REGISTER` | 🟡 untested |
| `DEVICE_REVOKE` | 🟡 untested |
| `DEVICE_TRUST` | 🟡 untested |
| `DEVICE_VERIFY_RECORD` | 🟡 untested |
| `HOME_DOOR_LOCK` | 🔴 broken |
| `HOME_GATE_CODE` | 🔴 broken |
| `HOME_SCENE` | 🔴 broken |
| `IMESSAGE_CHATS` | 🟢 works |
| `IMESSAGE_REPLY` | 🟡 untested |
| `IMESSAGE_RUN` | 🟡 untested |
| `IMESSAGE_SEARCH` | 🟡 untested |
| `IMESSAGE_SEND` | 🟡 untested |
| `IMESSAGE_THREAD` | 🟡 untested |
| `IMESSAGE_WATCH` | 🟡 untested |
| `IMSG_ACCOUNT` | 🟢 works |
| `IMSG_ACTIVITY` | 🔴 broken |
| `IMSG_AFTER` | 🟢 works |
| `IMSG_CHATS` | 🟢 works |
| `IMSG_CREATE_CHAT` | 🔴 broken |
| `IMSG_CURRENT_USER` | 🟢 works |
| `IMSG_EDIT` | 🔴 broken |
| `IMSG_GROUP` | 🟢 works |
| `IMSG_HISTORY` | 🟢 works |
| `IMSG_IDENTITIES` | 🟢 works |
| `IMSG_INBOX` | 🟢 works |
| `IMSG_INBOX_SINCE` | 🟢 works |
| `IMSG_LOAD_ATTACHMENT` | 🔴 broken |
| `IMSG_MARK_READ` | 🔴 broken |
| `IMSG_MARK_UNREAD` | 🔴 broken |
| `IMSG_MESSAGE` | 🟢 works |
| `IMSG_MESSAGES` | 🔴 broken |
| `IMSG_REACT` | 🔴 broken |
| `IMSG_REACT_LATEST` | 🟢 works |
| `IMSG_REPLY` | 🟢 works |
| `IMSG_SCHEDULED` | 🟢 works |
| `IMSG_SEARCH` | 🟢 works |
| `IMSG_SEND` | 🟢 works |
| `IMSG_SEND_CHAT` | 🟢 works |
| `IMSG_SEND_FILE` | 🟡 untested |
| `IMSG_SEND_STATUS` | 🔴 broken |
| `IMSG_STATS` | 🟢 works |
| `IMSG_STATUS` | 🟢 works |
| `IMSG_TYPING` | 🔴 broken |
| `IMSG_UNREACT` | 🔴 broken |
| `IMSG_UNREAD` | 🟢 works |
| `IMSG_UNSEND` | 🔴 broken |
| `IMSG_VERBS` | 🟢 works |
| `IMSG_WATCH_STATUS` | 🟢 works |
| `IMSG_WHOIS` | 🟢 works |
| `MAC_GUI_CLICK` | 🟡 untested |
| `MAC_GUI_SEE` | 🟡 untested |
| `MAC_GUI_TYPE` | 🟡 untested |
| `MAC_HS_RUN` | 🟡 untested |
| `MAC_LOCATION` | 🔴 broken |
| `MAC_SAFARI_JS` | 🟡 untested |
| `MAC_VM_CLONE` | 🟡 untested |
| `MAC_VM_DELETE` | 🟡 untested |
| `MAC_VM_LIST` | 🟢 works |
| `MAC_VM_PULL` | 🟡 untested |
| `MAC_VM_RUN` | 🟡 untested |
| `MAC_VM_STOP` | 🟡 untested |
| `PHONE_APPROVAL_CREATE` | 🟡 untested |
| `PHONE_APPROVAL_RESOLVE` | 🟡 untested |
| `PHONE_APPS` | 🟡 untested |
| `PHONE_APP_KILL` | 🟡 untested |
| `PHONE_APP_LAUNCH` | 🟡 untested |
| `PHONE_APP_RESTART` | 🟡 untested |
| `PHONE_CAMERA` | 🟡 untested |
| `PHONE_CLIPBOARD_HANDLE` | 🟡 untested |
| `PHONE_DEVICES` | 🟡 untested |
| `PHONE_DISPLAYS` | 🟡 untested |
| `PHONE_EVENTS_TAIL` | 🟡 untested |
| `PHONE_INFO` | 🟡 untested |
| `PHONE_LAUNCH` | 🟡 untested |
| `PHONE_LOCATION_HANDLE` | 🟡 untested |
| `PHONE_NOTIFY` | 🟡 untested |
| `PHONE_ORIENT` | 🟡 untested |
| `PHONE_REPLAY` | 🟡 untested |
| `PHONE_SHARE_IMAGE_HANDLE` | 🟡 untested |
| `PHONE_SHARE_TEXT_HANDLE` | 🟡 untested |
| `PHONE_SHARE_URL_HANDLE` | 🟡 untested |
| `PHONE_TOOLS` | 🟡 untested |
| `PHONE_VOICE_NOTE_HANDLE` | 🟡 untested |
| `STARLINK_HISTORY` | 🟡 untested |
| `STARLINK_OBSTRUCTION` | 🟡 untested |
| `STARLINK_REBOOT` | 🟡 untested |
| `STARLINK_STATUS` | 🟡 untested |
| `TEXT` | 🟡 untested |

### observation points (18)

where signals appear and where receipts land

Apps: Messages (1), Contacts (1), Calendar (1), Notes (1), Mail (1), Photos (1), Safari (1), Screen Time (1), unified log (1), FSEvents (1), distributed notifications (1), Darwin notifications (1), syslog (1), Shortcuts automations (1), the phone recorder (1), the build ledger (1), text accounts (1), TCC (1)

chat.db (message, chat, handle, attachment, *_join) · AddressBook-v22.abcddb · Calendar.sqlitedb · NoteStore.sqlite · Envelope Index · Photos.sqlite · History.db, Bookmarks.plist, CloudTabs.db (tabs open on the phone!) · knowledgeC.db (app usage, device state, synced from the phone) · `log stream` / `log show` · file system events on any store · NSDistributedNotificationCenter (`distnoted`) · pymobiledevice3 notification observe · pymobiledevice3 syslog live · the trigger catalog · phone_events table + DCAP census · events + capability_invocations + work_actions (hash-chained) · text_events, text_webhook_deliveries · TCC.db (Automation, Accessibility, Full Disk Access grants)

### composed (10)

tools this Mac composed from the encyclopedia: shortcuts, launchd automations, chains (atoms are directory rows)

Apps: Shortcuts (7), surface (3)

Kernel name echo · Surface Compose Test · Surface getclipboard 94cc06 · Mac status line · Surface postonfacebook e8a3f3 · Surface previewdocument a413ca · Surface addmusictoupnext 7b6b06 · Surface addframetogif 4a3192 · Surface setvolume f46ce8 · Mac version then dock size

## Supabase, the Cloudflare CLI and Wrangler

**Directory coverage**

| Family | Rows |
|---|---|
| CF_* (Cloudflare API, MCP servers) | 200 |
| CLI_CF (cf CLI on the Mac) | 1 |
| CLI_WRANGLER (wrangler on the Mac) | 1 |
| D1_* | 4 |
| R2_* | 4 |
| KV_* | 7 |
| Supabase (any) | 0 |
| APPLE_* | 10 |
| IMSG_* / IMESSAGE_* | 42 |
| PHONE_* | 22 |
| DCAP_* | 37 |
| MAC_* | 13 |
| LOCAL_* | 41 |
| SURFACE_* | 8 |
| SHORTCUT_* | 2 |
| ALFRED | 1 |
| BROWSER_* | 9 |
| DESKTOP_* | 3 |
| NET_* / LINE_SEARCH / SITE_* / PAGE_JSON | 10 |
| STARLINK_* | 4 |

### Supabase CLI 2.119.0: 38 commands, 0 Directory rows

| Command | What it does |
|---|---|
| `supabase backups` | Manage Supabase physical backups |
| `supabase bootstrap` | Bootstrap a Supabase project from a starter template |
| `supabase branches` | Manage preview branches |
| `supabase completion` | Generate the autocompletion script for the specified shell |
| `supabase config` | Manage project configurations |
| `supabase db` | Manage databases |
| `supabase domains` | Manage custom domain names for Supabase projects |
| `supabase encryption` | Manage encryption keys |
| `supabase feedback` | Send feedback to the Supabase team |
| `supabase functions` | Manage Supabase Edge functions |
| `supabase gen` | Run code generation tools |
| `supabase init` | Initialize a local project |
| `supabase inspect` | Inspect project tools |
| `supabase issue` | Open GitHub issue forms |
| `supabase link` | Link to a Supabase project |
| `supabase login` | Authenticate using an access token |
| `supabase logout` | Log out and delete access tokens locally |
| `supabase network-bans` | Manage network bans |
| `supabase notebooks` | Manage Supabase notebooks |
| `supabase orgs` | Manage Supabase organizations |
| `supabase postgres-config` | Manage Postgres database config |
| `supabase projects` | Manage projects |
| `supabase pull` | Pull remote project state into the local checkout |
| `supabase secrets` | Manage Supabase secrets |
| `supabase seed` | Seed a Supabase project |
| `supabase services` | Show versions of all Supabase services |
| `supabase snippets` | Manage Supabase SQL snippets |
| `supabase ssl-enforcement` | Manage SSL enforcement |
| `supabase sso` | Manage Single Sign-On (SSO) authentication |
| `supabase start` | Start local Supabase stack |
| `supabase status` | Show status of local Supabase containers |
| `supabase stop` | Stop all local Supabase containers |
| `supabase storage` | Manage Supabase Storage objects |
| `supabase telemetry` | Manage telemetry |
| `supabase test` | Run tests on local Supabase containers |
| `supabase unlink` | Unlink a Supabase project |
| `supabase vanity-subdomains` | Manage vanity subdomains |
| `supabase whoami` | Show the current user |

### Wrangler 4.103.0: 42 commands, reached only through CLI_WRANGLER

| Command | What it does |
|---|---|
| `wrangler docs [search..]` | 📚 Open Wrangler's command documentation in your browser |
| `wrangler complete [shell]` | ⌨️ Generate and handle shell completions |
| `wrangler email` | Manage Cloudflare Email services [open beta] |
| `wrangler auth` | 🔐 Manage authentication |
| `wrangler login` | 🔓 Login to Cloudflare |
| `wrangler logout` | 🚪 Logout from Cloudflare |
| `wrangler whoami` | 🕵️ Retrieve your user information |
| `wrangler agent-memory` | 🧠 Manage Agent Memory namespaces [private beta] |
| `wrangler ai` | 🤖 Manage AI models |
| `wrangler ai-search` | 🔍 Manage AI Search instances [open beta] |
| `wrangler browser` | 🌐 Manage Browser Run sessions [open beta] |
| `wrangler containers` | 📦 Manage Containers |
| `wrangler delete [name]` | 🗑️ Delete a Worker from Cloudflare |
| `wrangler deploy [path]` | 🆙 Deploy a Worker to Cloudflare |
| `wrangler deployments` | 🚢 List and view the current and past deployments for your Worker |
| `wrangler dev [script]` | 👂 Start a local server for developing your Worker |
| `wrangler dispatch-namespace` | 🏗️ Manage dispatch namespaces |
| `wrangler init [name]` | 📥 Initialize a basic Worker |
| `wrangler pages` | ⚡️ Configure Cloudflare Pages |
| `wrangler preview [script]` | 👀 Create a Preview deployment of the current Worker [private beta] |
| `wrangler queues` | 📬 Manage Workers Queues |
| `wrangler rollback [version-id]` | 🔙 Rollback a deployment for a Worker |
| `wrangler secret` | 🤫 Generate a secret that can be referenced in a Worker |
| `wrangler setup` | 🪄 Setup a project to work on Cloudflare |
| `wrangler tail [worker]` | 🦚 Start a log tailing session for a Worker |
| `wrangler triggers` | 🎯 Updates the triggers of your current deployment [experimental] |
| `wrangler types [path]` | 📝 Generate types from your Worker configuration |
| `wrangler versions` | 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare |
| `wrangler vpc` | 🌐 Manage VPC [open beta] |
| `wrangler websearch` | 🔎 Run queries against Cloudflare Web Search [experimental] |
| `wrangler workflows` | 🔁 Manage Workflows |
| `wrangler artifacts` | 🧱 Manage Artifacts namespaces and repos [private beta] |
| `wrangler d1` | 🗄️ Manage Workers D1 databases |
| `wrangler hyperdrive` | 🚀 Manage Hyperdrive databases |
| `wrangler kv` | 🗂️ Manage Workers KV Namespaces |
| `wrangler pipelines` | 🚰 Manage Cloudflare Pipelines [open beta] |
| `wrangler r2` | 📦 Manage R2 buckets & objects |
| `wrangler secrets-store` | 🔐 Manage the Secrets Store [open beta] |
| `wrangler vectorize` | 🧮 Manage Vectorize indexes |
| `wrangler cert` | 🪪 Manage client mTLS certificates and CA certificate chains used for secured connections [open beta] |
| `wrangler mtls-certificate` | 🪪 Manage certificates used for mTLS connections |
| `wrangler tunnel` | 🚇 Manage Cloudflare Tunnels [experimental] |

### cf 1.0.0-beta.10: the Cloudflare CLI, reached only through CLI_CF

Find a command with `cf cli search "<task>"`; request details with `cf schema <command>`.

| Command | What it does |
|---|---|
| `cf cli` | search "<describe the task you want to accomplish>" |
| `cf abuse-reports` | Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites |
| `cf access` | Access protected applications and services |
| `cf account-tags` | account-tags |
| `cf accounts` | Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account |
| `cf addressing` | addressing |
| `cf agent-memory` | agent-memory |
| `cf ai` | ai |
| `cf ai-audit` | ai-audit |
| `cf ai-gateway` | Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more |
| `cf ai-search` | Managed search-as-a-service: crawl, index, and query content with AI-powered relevance and chat completions |
| `cf analytics` | Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics |
| `cf artifacts` | artifacts |
| `cf auth` | Manage authentication and profiles |
| `cf basin-catalog` | Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines |
| `cf billing` | Account billing profiles and usage data for Cloudflare subscriptions and add-on services |
| `cf browser-run` | browser-run |
| `cf build` | Build a project for Cloudflare |
| `cf builds` | Build and deploy Workers from connected repositories, then inspect build status and logs. |
| `cf cache` | Purge cached content and configure Cache Reserve, tiered caching, and variant serving |
| `cf cli` | Discover commands and configure the cf CLI |
| `cf cloud-connector` | Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers |
| `cf cloudforce-one` | Detection rule management APIs |
| `cf complete [shell]` | Generate and handle shell completions |
| `cf containers` | Deploy and manage Containers applications on Cloudflare's global network |
| `cf cps` | cps |
| `cf custom-csrs` | custom-csrs |
| `cf custom-nameservers` | custom-nameservers |
| `cf custom-pages` | Manage custom error and challenge pages and their assets for accounts and zones |
| `cf d1` | D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access. |
| `cf deploy` | Deploy a project to Cloudflare |
| `cf dev [implArgs..]` | Run the project's Cloudflare dev server |
| `cf dns` | dns |
| `cf durable-objects` | durable-objects |
| `cf email-routing` | Route incoming email to verified destination addresses or Workers with routing rules, catch-all behavior, and managed DNS records |
| `cf email-security` | Cloud email security — investigate threats, manage allow/block policies, and detect phishing |
| `cf email-sending` | Send transactional email and manage sending subdomains and their DNS configuration |
| `cf firewall` | Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages |
| `cf flagship` | flagship |
| `cf hyperdrive` | Accelerate access to existing databases by caching queries and pooling connections at the edge |
| `cf images` | Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads |
| `cf init [directory]` | Create a new Cloudflare project or set up an existing one |
| `cf intel` | Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds |
| `cf k2` | Durable, ordered event streams that you produce records to and consume from with subscriptions |
| `cf keys` | keys |
| `cf kv` | kv |
| `cf load-balancers` | Distribute traffic across origin pools with health monitoring, geo-steering, and failover |
| `cf logpush` | logpush |
| `cf logs` | Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields |
| `cf magic-network-monitoring` | Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion |
| `cf managed-defense` | managed-defense |
| `cf mcp` | mcp |
| `cf migrate [path]` | Migrate a Wrangler project to cf |
| `cf monetization` | monetization |
| `cf observability` | observability |
| `cf organization` | organization |
| `cf organizations` | Multi-user organizations that group accounts, members, and shared settings under a single entity |
| `cf pages` | Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains |
| `cf pay-per-crawl` | pay-per-crawl |
| `cf pay-per-use` | pay-per-use |
| `cf pipelines` | Ingest, transform, and route event streams into R2, analytics, or other destinations in real time |
| `cf previews` | Manage Worker Previews |
| `cf queues` | Reliable message queuing between Workers — produce, consume, and batch-process messages at scale |
| `cf r2` | S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration |
| `cf r2-data-catalog` | Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines |
| `cf rate-limit-analytics` | rate-limit-analytics |
| `cf realtime` | Real-time audio, video, and data services on Cloudflare's global network |
| `cf registrar` | registrar |
| `cf registrar-sandbox` | registrar-sandbox |
| `cf reporting` | reporting |
| `cf resource-sharing` | Share Cloudflare resources (zones, accounts) across organizations with granular access controls |
| `cf resource-tagging` | resource-tagging |
| `cf rules` | Resources used by Cloudflare rules and rulesets |
| `cf rulesets` | rulesets |
| `cf schema [command..]` | Show API schema details for a command |
| `cf secrets-store` | Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products |
| `cf security-insights` | security-insights |
| `cf security-txt` | Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities |
| `cf snippets` | snippets |
| `cf speed` | Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests |
| `cf stream` | Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale |
| `cf tags` | tags |
| `cf tenant` | tenant |
| `cf user` | Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens |
| `cf values` | values |
| `cf vectorize` | Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers |
| `cf waiting-rooms` | Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages |
| `cf workers` | workers |
| `cf workers-for-platforms` | workers-for-platforms |
| `cf workers-vpc` | workers-vpc |
| `cf workflows` | Durable, multi-step workflows that run on Workers with automatic retries and state persistence |
| `cf zero-trust` | Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation |
| `cf zone` | zone |
| `cf zones` | Zones are domains on Cloudflare — list, create, and configure domain settings [string] ~/.config/cloudflare/state)                         [string] |

## Programmatic tool calling and dynamic workers, against your pattern

Both remove the same waste: tool definitions loaded up front, and every intermediate result passing through the model. They differ in who writes the logic.

|  | Programmatic tool calling (Anthropic) | Dynamic workers / Code Mode (Cloudflare) | Your atomic tools |
|---|---|---|---|
| Who writes the logic | The model writes Python each call; it runs in a code-execution container and calls your tools as functions. | The model writes TypeScript against a typed API made from your MCP tools; a fresh isolate runs it. | You write it once, in the tool. The model sends a declaration: `{op, …complications, return}`. |
| What the model must know | The tool signatures and enough code to loop, filter and retry. | The generated TypeScript types. | One schema per domain: the `op` list and its fields. |
| Fallbacks and retries | Whatever the generated code does, newly each time. | Whatever the generated code does, newly each time. | Fixed in the tool, the same every time (`WEB`'s fallback table, `CODE`'s hash check). |
| Intermediate results | Stay in the container; the model sees what the script prints. | Stay in the isolate; the model sees what the code returns. | Stored whole first; the model gets `return.select` / `max_bytes` plus a `full_ref` to the rest. |
| Evidence | What the script chose to print, plus container logs. | What the code returns, plus Worker logs. | Every call out and every answer is a Ledger row, including refusals. |
| Authority | Whatever the container and the exposed tools allow. | Whatever bindings the isolate is given. | Checked outside the model: unknown fields refused, hashes required, scoped tokens can limit tools, arguments and time. |
| Cost per call | Container start plus script generation. | Isolate start (milliseconds) plus code generation. | No code generation; one round trip. |
| Novel task | Strong: the model can compose anything the tools allow. | Strong, for the same reason. | Weak: an `op` that does not exist cannot be called. `COMPUTER` answers `needs_plan`. |
| Repeated task | Re-derived every time, and it can come out different. | Re-derived every time. | Strong: the same path, verified, every time. |

### When each one wins

- **Your pattern** wins when the task repeats, the side effects matter (writing files, deploying, sending, publishing), you need evidence afterwards, or the model is cheap or unreliable. The tool holds the hard parts, so a small model can call it correctly.
- **Programmatic tool calling / dynamic workers** win for one-off analysis across many tool results, joining data across several tools in one pass, and tasks nobody anticipated with an `op`.
- **Together:** let the model write code when no `op` fits. When the same code succeeds more than once, turn it into a new `op`. That is your Oct 5 idea of compiling successful recoveries into reusable paths.

### How I read your tool

Each domain gets one tool. Its arguments are a small command language: `op` is the verb, the other fields are its complications, and `return` says how much comes back. The runtime turns that declaration into the real calls, applies the fallbacks and checks, stores the whole outcome, and gives the model only the part it asked for. The model states what it wants. The tool owns how, the limits, and the record. Because the tool, not the model, enforces what may happen, the same structure is a control boundary as well as a way to save tokens.

## Full invocation contracts

Every way the build can call each tool, 30 per tool, each a whole runnable call. Every key and token is replaced with `<KEY>` / `<SCOPED_TOKEN>`. The execution contract (limits, failure logic, guarantees) follows each tool once; in the live answer it is repeated inside all 30 ways.

Note: `CLI_CF` and `CLI_WRANGLER` still `cd` into the archived `~/miscsubjects-pages`. APPLE has no live contract yet because production does not run its code.

### CODE (30/30 ways)

Unified coding tool: schema, grep, read, edit, write, check, grammar, deploy, ship, job and result. Complete execution contract in JSON: all fields and bounds, dependencies, response budgeting, failure/recovery states and 30 invocation methods. Hash-checked canonical writes; detached tests/deploys; full evidence references. Deterministic operations; no model planner or sealed-step resumption.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "CODE",
    "args": {
      "op": "schema"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "CODE",
    "args": {
      "op": "schema"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=CODE&args=%7B%22op%22%3A%22schema%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "CODE",
      "arguments": {
        "args": {
          "op": "schema"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "CODE",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run CODE '{\"op\":\"schema\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call CODE '{\"op\":\"schema\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run CODE {\"op\":\"schema\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[CODE]{\"op\":\"schema\"}[/CODE]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/CODE",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "op": "schema"
  }
}
```

**Upstream (straight to the service)** (`upstream`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "CODE",
    "args": {
      "op": "schema"
    }
  }
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"CODE\", {\"op\":\"schema\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"CODE\", {\"op\":\"schema\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"CODE\",\"arguments\":{\"args\":{\"op\":\"schema\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=CODE&args=%7B%22op%22%3A%22schema%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "CODE",
      "args": {
        "op": "schema"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run CODE '\\''{\"op\":\"schema\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "CODE",
    "args": {
      "op": "schema"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "CODE",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "CODE",
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "CODE",
    "args": {
      "op": "schema"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/CODE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/CODE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/CODE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "CODE",
    "arguments": "{\"op\":\"schema\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"CODE\", \"args\": {\"op\": \"schema\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

**Execution contract**

```json
{
  "contract_version": "miscsubjects/CODE/execution/1",
  "name": "CODE",
  "scope": "Unified coding tool, not the separate CODE base-method Directory row",
  "status": "Implemented behavior documented from source; generated invocation contracts do not prove installation, authentication or execution of every adapter",
  "source_files": [
    {
      "path": "/Users/cyrusmassoumi/misc-sheets/src/tools/coding.js",
      "sha256": "10ce00bf1f09fff1581addc1aa46907c98310b9dc17547d7ee0858d4e30351ce"
    },
    {
      "path": "/Users/cyrusmassoumi/misc-sheets/coding-tool.mjs",
      "sha256": "7f558c7ff035a0cb20a2da0e2c5989b8138e729b5e66d6ab7a5461d73c5fbbf6"
    },
    {
      "path": "/Users/cyrusmassoumi/misc-sheets/src/ways.js",
      "sha256": "5589b7b0809033cf363423b6a92fefd96ed1620c45914371747bcf3c401109e6"
    },
    {
      "path": "/Users/cyrusmassoumi/misc-sheets/src/tools/lib.js",
      "sha256": "5e16d068ff0803234d6bdc2731f202c0b9c12fb3e29708c00bc574bdd9182e33"
    }
  ],
  "input_schema": {
    "type": "object",
    "required": [
      "op"
    ],
    "additionalProperties": false,
    "properties": {
      "op": {
        "type": "string",
        "enum": [
          "schema",
          "grep",
          "read",
          "edit",
          "write",
          "check",
          "grammar",
          "deploy",
          "ship",
          "job",
          "result"
        ]
      },
      "path": {
        "type": "string",
        "description": "Relative build path; traversal and external symlinks refused"
      },
      "pattern": {
        "type": "string"
      },
      "regex": {
        "type": "boolean",
        "default": false
      },
      "ignore_case": {
        "type": "boolean"
      },
      "offset": {
        "type": "integer",
        "minimum": 1
      },
      "limit": {
        "type": "integer",
        "minimum": 0
      },
      "base_hash": {
        "type": "string",
        "description": "Canonical hash returned by read; required for replacing existing files"
      },
      "edits": {
        "type": "array",
        "items": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 2,
          "maxItems": 2
        }
      },
      "content": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "enum": [
          "syntax",
          "tests"
        ]
      },
      "paths": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "changes": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "path"
          ],
          "properties": {
            "op": {
              "enum": [
                "edit",
                "write"
              ]
            },
            "path": {
              "type": "string"
            },
            "base_hash": {
              "type": "string"
            },
            "content": {
              "type": "string"
            },
            "edits": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 2,
                "maxItems": 2
              }
            }
          }
        }
      },
      "verify_paths": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "job_id": {
        "type": "string"
      },
      "ref": {
        "type": "string"
      },
      "text": {
        "type": "string"
      },
      "language": {
        "type": "string",
        "default": "en-US"
      },
      "return": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "select": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "mode": {
            "type": "string",
            "enum": [
              "selected",
              "full",
              "reference"
            ]
          }
        }
      }
    }
  },
  "mcp_input_schema": {
    "type": "object",
    "required": [
      "args"
    ],
    "properties": {
      "args": {
        "type": "object",
        "required": [
          "op"
        ],
        "additionalProperties": false,
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "schema",
              "grep",
              "read",
              "edit",
              "write",
              "check",
              "grammar",
              "deploy",
              "ship",
              "job",
              "result"
            ]
          },
          "path": {
            "type": "string",
            "description": "Relative build path; traversal and external symlinks refused"
          },
          "pattern": {
            "type": "string"
          },
          "regex": {
            "type": "boolean",
            "default": false
          },
          "ignore_case": {
            "type": "boolean"
          },
          "offset": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 0
          },
          "base_hash": {
            "type": "string",
            "description": "Canonical hash returned by read; required for replacing existing files"
          },
          "edits": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 2,
              "maxItems": 2
            }
          },
          "content": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "syntax",
              "tests"
            ]
          },
          "paths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path"
              ],
              "properties": {
                "op": {
                  "enum": [
                    "edit",
                    "write"
                  ]
                },
                "path": {
                  "type": "string"
                },
                "base_hash": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                },
                "edits": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 2,
                    "maxItems": 2
                  }
                }
              }
            }
          },
          "verify_paths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "job_id": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "default": "en-US"
          },
          "return": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "select": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "max_bytes": {
                "type": "integer",
                "minimum": 0
              },
              "mode": {
                "type": "string",
                "enum": [
                  "selected",
                  "full",
                  "reference"
                ]
              }
            }
          }
        }
      },
      "way": {
        "type": "string"
      }
    },
    "additionalProperties": false
  },
  "field_bounds": [
    {
      "field": "args",
      "type": "object",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [
        "op"
      ],
      "additionalProperties": false
    },
    {
      "field": "args.op",
      "type": "string",
      "enum": [
        "schema",
        "grep",
        "read",
        "edit",
        "write",
        "check",
        "grammar",
        "deploy",
        "ship",
        "job",
        "result"
      ],
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.path",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.pattern",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.regex",
      "type": "boolean",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": false,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.ignore_case",
      "type": "boolean",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.offset",
      "type": "integer",
      "enum": null,
      "minimum": 1,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.limit",
      "type": "integer",
      "enum": null,
      "minimum": 0,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.base_hash",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.edits",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.edits[]",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": 2,
      "maxItems": 2,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.edits[][]",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.content",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.kind",
      "type": "string",
      "enum": [
        "syntax",
        "tests"
      ],
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.paths",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.paths[]",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[]",
      "type": "object",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [
        "path"
      ],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].op",
      "type": "enum",
      "enum": [
        "edit",
        "write"
      ],
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].path",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].base_hash",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].content",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].edits",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].edits[]",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": 2,
      "maxItems": 2,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.changes[].edits[][]",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.verify_paths",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.verify_paths[]",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.job_id",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.ref",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.text",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.language",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": "en-US",
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.return",
      "type": "object",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": false
    },
    {
      "field": "args.return.select",
      "type": "array",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.return.select[]",
      "type": "string",
      "enum": null,
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.return.max_bytes",
      "type": "integer",
      "enum": null,
      "minimum": 0,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    },
    {
      "field": "args.return.mode",
      "type": "string",
      "enum": [
        "selected",
        "full",
        "reference"
      ],
      "minimum": null,
      "maximum": null,
      "minLength": null,
      "maxLength": null,
      "minItems": null,
      "maxItems": null,
      "default": null,
      "bounds_without_value": "No bound declared by this schema; platform and runtime constraints still apply",
      "required_children": [],
      "additionalProperties": "not restricted by this schema"
    }
  ],
  "decoding": {
    "canonical": "One object matching input_schema",
    "rest": {
      "tool": "CODE",
      "args": {
        "op": "schema"
      }
    },
    "mcp": {
      "name": "CODE",
      "arguments": {
        "args": {
          "op": "schema"
        }
      }
    },
    "body_override": "When a runner supplies body, CODE validates body instead of args",
    "shorthand": "No additional positional shorthand or free-text goal grammar implemented inside CODE; line/tag transports still contain JSON",
    "escaping": "Serialize objects with JSON.stringify or a JSON library. JS/Python/CLI adapters translate the same argument object; do not hand-escape nested JSON.",
    "unknown_fields": "Top-level unknown fields are refused. Nested schema restrictions are declared but not all are separately enforced by validateSpec."
  },
  "limits": {
    "model": {
      "called_by_CODE": false,
      "rounds": "<KEY>",
      "output_tokens": "<KEY>",
      "reasoning": "<KEY>"
    },
    "http_request_body": {
      "maximum_bytes": 8388608,
      "enforced_by": "src/r2-worker.js MAX_BODY",
      "includes": "Serialized transport envelope and arguments",
      "exceeded": {
        "http_status": 413,
        "fields": [
          "error",
          "cap_bytes",
          "sent_bytes",
          "hint"
        ]
      },
      "applies_to": "Requests entering this build; external executor/service limits may differ"
    },
    "child_process": {
      "maxBuffer_bytes": 268435456,
      "timeout": "No spawnSync timeout configured",
      "overflow": "Child command failure, preserved as failed outcome; no automatic rerun"
    },
    "return_data": {
      "maximum_bytes": "Caller return.max_bytes; no default ceiling",
      "minimum_requested": 0,
      "maximum_requested": 9007199254740991,
      "unit": "UTF-8 bytes of JSON.stringify(data)",
      "outer_envelope_budgeted": false,
      "full_mode_budget_conflict": true,
      "null_representation_bytes": 4
    },
    "request_URL_bytes": "UNKNOWN: no CODE-specific URL bound; browser/proxy/transport limits apply",
    "storage_object_bytes": "UNKNOWN: storage backend limits apply; no CODE-specific bound",
    "grammar_service_limits": "UNKNOWN: current provider request/rate limits are not encoded here",
    "execution_deadline": "No CODE executor deadline configured; Worker, Mac bridge and service deadlines still apply",
    "deploy_wait_ms": 1000,
    "deploy_wait_deadline": "No deadline configured",
    "return_ref_retention": "No CODE TTL or expiry configured; availability depends on storage retaining the referenced object",
    "bounds_interpretation": "null in field_bounds means not declared, not infinite capacity or a validated platform maximum"
  },
  "runtime_fields": {
    "path": {
      "root": "/Users/cyrusmassoumi/misc-sheets",
      "default": ". for grep; buildPath defaults missing path to .",
      "forbidden": [
        "NUL",
        "path outside root",
        "existing ancestor symlink outside root"
      ],
      "absolute_inside_root_allowed": true
    },
    "pattern": {
      "required_for": "grep",
      "minimum_length": 1,
      "regex_default": false,
      "ignore_case_default": false
    },
    "offset": {
      "required_for": "read only when overriding default",
      "default": 1,
      "minimum": 1,
      "runtime_check": "Number.isInteger"
    },
    "limit": {
      "default": "all remaining lines",
      "minimum": 0,
      "runtime_check": "Number.isInteger"
    },
    "base_hash": {
      "existing_file": "Required and must equal canonical read hash",
      "new_file": "Must be absent",
      "comparison": "Exact string; final writer checks WRITE_BASE_HASH again"
    },
    "edits": {
      "minimum_items": 1,
      "pair_items": 2,
      "old_text_minimum_length": 1,
      "new_text_minimum_length": 0,
      "anchor_matches_required": 1,
      "application": "Sequential exact literal replacements"
    },
    "content": {
      "required_for": "write",
      "type": "string",
      "minimum_length": 0
    },
    "kind": {
      "default": "syntax",
      "enum": [
        "syntax",
        "tests"
      ]
    },
    "paths": {
      "for": "check kind=tests",
      "default": "all tests/*.test.mjs sorted",
      "minimum_items_when_supplied": 1
    },
    "changes": {
      "required_for": "ship",
      "minimum_items": 0,
      "default_child_op": "edit",
      "children": "Same path/hash/edit/write rules; applied sequentially"
    },
    "verify_paths": {
      "default": [
        "/api/health"
      ],
      "minimum_items": 0,
      "warning": "Empty list skips live probes",
      "rules": [
        "Each path begins /api/",
        "No query or fragment",
        "Authenticated GET only"
      ],
      "success": "HTTP 2xx; not a behavioral assertion"
    },
    "job_id": {
      "pattern": "^[a-f0-9-]{36}$",
      "required_for": [
        "job",
        "result without ref"
      ],
      "not_a_strict_UUID_validator": true
    },
    "ref": {
      "pattern": "^coding/results/[a-f0-9-]+\\.json$",
      "required_for": "result by stored reference",
      "precedence": "ref takes precedence over job_id"
    },
    "text": {
      "required_for": "grammar",
      "minimum_length": 1
    },
    "language": {
      "default": "en-US",
      "validation": "Passed to LanguageTool; no CODE language whitelist"
    },
    "return": {
      "mode_default": "selected",
      "select_default": [
        "data",
        "receipt"
      ],
      "select_paths": "Dot-separated paths in full outcome, e.g. data.hash; numeric array indexes supported; no wildcard",
      "missing_selection": "Silently omitted",
      "max_bytes": "Safe integer >=0; not a model/context/turn cap",
      "reference": "data=null; full_ref remains available",
      "full": "All full outcome fields inside data; cannot also set max_bytes"
    }
  },
  "dependencies": {
    "shared": [
      {
        "name": "Build authentication",
        "binding": "x-sheets-key or Authorization Bearer; secret remains in /Users/cyrusmassoumi/.misc-sheets-key",
        "required": "HTTP/MCP methods except existing signed/token/login paths"
      },
      {
        "name": "STORE binding",
        "required": "Full results before reduction; result references",
        "backend": "Use the configured store adapter; CODE does not require D1 or a named container"
      },
      {
        "name": "Ledger",
        "required": "Raw request/result evidence; executor records before and after work"
      }
    ],
    "mac": [
      {
        "name": "Mac command bridge",
        "url": "https://agent.miscsubjects.com/exec",
        "credential_binding": "TERMINAL_KEY, falling back to BUILD_KEY",
        "requires": "Network, authenticated bridge, this Mac available"
      },
      {
        "name": "Node",
        "path": "/opt/homebrew/bin/node"
      },
      {
        "name": "Executor",
        "path": "/Users/cyrusmassoumi/misc-sheets/coding-tool.mjs"
      },
      {
        "name": "Canonical writer",
        "path": "/Users/cyrusmassoumi/misc-sheets/write.mjs",
        "requires": "Canonical file read/hash, accepted mutation and recorded write"
      },
      {
        "name": "Local job evidence",
        "path": "/Users/cyrusmassoumi/.coding-tool-runs",
        "requires": "Writable persistent directory"
      },
      {
        "name": "Ledger ingestion credential",
        "path": "/Users/cyrusmassoumi/.misc-sheets-ledger-key"
      }
    ],
    "grep": [
      {
        "name": "ripgrep",
        "optional_for": "literal directory/file search",
        "required_for": "regex search"
      }
    ],
    "grammar": [
      {
        "name": "LanguageTool public service",
        "url": "https://api.languagetool.org/v2/check",
        "network_required": true,
        "model_required": false
      }
    ],
    "deploy": [
      {
        "name": "Existing deploy gate",
        "path": "/Users/cyrusmassoumi/misc-sheets/deploy.mjs",
        "requires": "Its tests, build dependencies, deployment credentials and Cloudflare access; gate failures are propagated"
      },
      {
        "name": "Live probes",
        "origin": "https://miscsubjects.com",
        "credential_location": "/Users/cyrusmassoumi/.misc-sheets-key"
      }
    ]
  },
  "operations": [
    {
      "op": "schema",
      "requires": [],
      "steps": [
        "Validate op and top-level args",
        "Return input schema and current small schema response"
      ],
      "result": {
        "detached": false,
        "return_reduction_applied": false,
        "full_ref_created": false
      }
    },
    {
      "op": "read",
      "requires": [
        "path resolves to existing canonical file"
      ],
      "steps": [
        "Read through write.mjs --read",
        "Refuse disk/canonical disagreement",
        "Slice requested lines"
      ],
      "result": {
        "fields": [
          "path",
          "hash",
          "bytes",
          "total_lines",
          "offset",
          "text"
        ]
      }
    },
    {
      "op": "grep",
      "requires": [
        "nonempty pattern"
      ],
      "steps": [
        "Search workspace with rg JSON",
        "Treat exit 1 as successful empty matches",
        "Only if rg is missing and regex=false, use internal literal scan"
      ],
      "result": {
        "fields": [
          "pattern",
          "path",
          "matches",
          "fallback when used"
        ],
        "semantic_recursive_search": false,
        "fallback_excludes": [
          "node_modules",
          ".git",
          "dist",
          "symlinks",
          "binary files with NUL"
        ]
      }
    },
    {
      "op": "edit",
      "requires": [
        "path",
        "matching base_hash for existing file",
        "nonempty exact edits"
      ],
      "steps": [
        "Canonical read/hash",
        "Apply each anchor exactly once",
        "Validate JS/JSON if configured",
        "Stage outside build",
        "write.mjs against base hash",
        "Canonical reread confirms text and hash"
      ],
      "result": {
        "fields": [
          "path",
          "before_hash",
          "hash",
          "validation",
          "bytes"
        ],
        "atomicity": "One canonical write, not a multi-file transaction"
      }
    },
    {
      "op": "write",
      "requires": [
        "path",
        "string content",
        "matching base_hash if existing"
      ],
      "steps": [
        "Canonical read/hash",
        "Validate JS/JSON if configured",
        "Stage outside build",
        "write.mjs against hash or absent",
        "Canonical reread"
      ],
      "result": {
        "unsupported_extension": "Write allowed with validation.ok=null; no syntax claim"
      }
    },
    {
      "op": "check",
      "requires": [
        "path for syntax, or kind=tests"
      ],
      "steps": [
        "Syntax: canonical read and configured validator",
        "Tests: detached Node test runner, named paths or all test files"
      ],
      "result": {
        "syntax_extensions": [
          ".json",
          ".js",
          ".mjs",
          ".cjs"
        ],
        "unsupported_status": "unsupported",
        "tests_detached": true
      }
    },
    {
      "op": "grammar",
      "requires": [
        "nonempty text"
      ],
      "steps": [
        "POST URL-encoded text/language to LanguageTool",
        "Parse JSON if possible, otherwise preserve text"
      ],
      "result": {
        "automatic_rewrite": false,
        "external_provider": true
      }
    },
    {
      "op": "deploy",
      "requires": [],
      "steps": [
        "Detach executor",
        "Wait for active exact node deploy.mjs process",
        "Run deploy.mjs gate",
        "GET verify_paths and require 2xx"
      ],
      "result": {
        "success": "done after gate exit 0 and specified probes",
        "empty_probes": "Gate alone",
        "atomicity": "No automatic rollback",
        "seals": "Does not invoke separate mac/ship.mjs seal/resume engine"
      }
    },
    {
      "op": "ship",
      "requires": [
        "changes array, possibly empty"
      ],
      "steps": [
        "Detach executor",
        "Apply changes sequentially using edit/write rules",
        "Execute same deploy path"
      ],
      "result": {
        "partial_application_possible": true,
        "rollback": false
      }
    },
    {
      "op": "job",
      "requires": [
        "valid job_id"
      ],
      "steps": [
        "Read local job directory/result",
        "No result: running",
        "recording=pending: running with execution_status",
        "Finished: compact steps, omit command stdout/stderr from data"
      ],
      "result": {
        "heartbeat": "Not implemented; running can include a dead/stalled executor",
        "restarts_work": false
      }
    },
    {
      "op": "result",
      "requires": [
        "valid ref or job_id"
      ],
      "steps": [
        "ref: load stored full JSON",
        "Otherwise load local job outcome",
        "Apply caller return policy"
      ],
      "result": {
        "reexecutes": false,
        "unfinished_job": "running",
        "default": "Selected data/receipt, not all steps; mode full retrieves full stored outcome"
      }
    }
  ],
  "response": {
    "semantic_envelope": {
      "ok": "boolean from full.ok!==false",
      "status": "done | running | stale | failed | unsupported | recording_failed, or preserved executor status",
      "error": "Present on reported failure",
      "data": "Selected/reduced valid JSON value",
      "full_ref": {
        "tool": "CODE",
        "args": {
          "op": "result",
          "ref": "Result object key generated by the tool"
        }
      },
      "job_id": "Present when full outcome has it",
      "job_ref": {
        "tool": "CODE",
        "args": {
          "op": "job",
          "job_id": "Executor job id"
        }
      },
      "return_size": {
        "scope": "data",
        "unit": "bytes",
        "original": "Size of full outcome JSON",
        "returned": "Size of returned data JSON",
        "maximum": "Requested max_bytes or null",
        "omitted": "true when budget fitting/reference mode removes content; selection alone may omit fields without marking true",
        "budget_unrepresentable": "true only if data=null still exceeds requested budget"
      }
    },
    "transport_wrappers": "Native answer contains text,out,exchanges and may be wrapped again by HTTP/MCP. Decode the documented adapter response; do not mistake outer success for inner execution success.",
    "evidence_order": [
      "Local raw invocation written",
      "Initial Ledger publish before executor work",
      "Local full result written with recording=pending",
      "Final Ledger publish",
      "Local final result updated",
      "Worker STORE full result",
      "Conversation selection/reduction"
    ],
    "schema_exception": "schema returns description/input_schema/return_contract/grammar directly; no full_ref or reduction",
    "html": "CODE has no special HTML exemption; max_bytes may omit an entire large text field, never cut that field mid-string"
  },
  "payload_roll": {
    "rules": [
      {
        "when": "No explicit select, mode not full",
        "then": "Select data and receipt"
      },
      {
        "when": "mode full",
        "then": "Return complete full outcome as data; reject simultaneous max_bytes"
      },
      {
        "when": "mode reference",
        "then": "Set data=null, preserve status/error/refs"
      },
      {
        "when": "Selected data exceeds max_bytes",
        "then": "Retain whole array prefix items and fitting object fields; recurse through nested objects; replace oversized primitive with null; never splice serialized JSON or truncate a field string"
      },
      {
        "when": "max_bytes is below representation size",
        "then": "Return data=null and budget_unrepresentable=true; report real returned bytes"
      },
      {
        "when": "Execution failed",
        "then": "Keep ok=false,status,error outside the data budget; preserve full evidence for retrieval"
      },
      {
        "when": "STORE write or bridge/schema validation fails before reduction",
        "then": "Propagate runner error; full_ref may not exist. Do not claim every failure has a full_ref."
      }
    ],
    "automatic_context_eviction": false,
    "models_not_capped": true
  },
  "failure_logic": [
    {
      "when": "Unauthenticated/rejected transport request",
      "action": "Authentication/adapter refuses before CODE; inspect HTTP status and raw return",
      "caller_next": "Use configured authentication for chosen adapter; no executor retry"
    },
    {
      "when": "Serialized request exceeds 8388608 bytes",
      "action": "Worker refuses HTTP 413 before CODE",
      "caller_next": "Use an existing supported staging/upload/reference mechanism; CODE itself has no chunked-content field"
    },
    {
      "when": "Invalid op/top-level field/return policy",
      "action": "validateSpec throws before executor invocation",
      "caller_next": "Correct arguments against input_schema and runtime_fields; no execution fallback"
    },
    {
      "when": "rg absent, literal grep",
      "action": "Internal literal search",
      "automatic": true,
      "resume": "Same invocation"
    },
    {
      "when": "rg absent, regex=true or rg exit other than 0/1",
      "action": "Return failed; no regex fallback",
      "automatic": true
    },
    {
      "when": "Stale/missing hash before write",
      "action": "Return stale and no write for that change",
      "caller_next": "Read current file/hash, reconcile, submit new call; CODE does not invent reconciliation"
    },
    {
      "when": "Anchor missing or ambiguous",
      "action": "Return failed before write",
      "caller_next": "Read exact current text; replace only a unique anchor"
    },
    {
      "when": "Syntax invalid",
      "action": "Refuse proposed write; preserve failure",
      "caller_next": "Correct content and submit with current hash"
    },
    {
      "when": "Later ship change fails",
      "action": "Stop before remaining changes/deploy; earlier accepted writes remain",
      "caller_next": "Inspect hashes/steps; do not blindly replay successful changes"
    },
    {
      "when": "Tests or deploy command fails",
      "action": "Stop remaining execution; return failed",
      "caller_next": "Retrieve result/steps and fix actual cause before new operation"
    },
    {
      "when": "Live probe fails after deployment",
      "action": "Return failed; deployment may already have happened",
      "caller_next": "Inspect deployed state/probe; do not blindly redeploy"
    },
    {
      "when": "Final Ledger publish fails after work",
      "action": "Return recording_failed, preserve execution_status and local full result",
      "caller_next": "Inspect local result/job and repair recording; do not repeat side effects"
    },
    {
      "when": "Initial Ledger publish fails",
      "action": "Executor work does not begin; CLI error handling records failed locally for detached work"
    },
    {
      "when": "Invalid bridge JSON / nonzero bridge exit / invalid executor JSON",
      "action": "Throw to runner; raw bridge return logged",
      "caller_next": "Inspect recorded return and local job evidence; execution outcome may be unknown"
    },
    {
      "when": "STORE save fails after execution",
      "action": "Propagate failure; execution may have succeeded",
      "caller_next": "Inspect Ledger/local job evidence before retry"
    },
    {
      "when": "Lost client connection or adapter timeout",
      "action": "No automatic cancellation guarantee",
      "caller_next": "Collect existing job by job_id; if job_id was not received, inspect recorded invocation before resubmitting"
    },
    {
      "when": "Unknown ref/job",
      "action": "Fail without substituting another result"
    },
    {
      "when": "Grammar provider fails",
      "action": "Return failed with HTTP status and provider payload; no secondary provider fallback"
    }
  ],
  "guarantees": {
    "sealed_steps": false,
    "multi_file_atomicity": false,
    "automatic_rollbacks": false,
    "side_effect_idempotency_keys": false,
    "automatic_model_planner": false,
    "automatic_semantic_recursion": false,
    "automatic_memory_cleanup": false,
    "screenshot_capture": false,
    "video_capture": false,
    "stop_early_alerts": false,
    "automatic_stall_detection": false,
    "automatic_retries": "Only grep missing-binary fallback; no general retry loop",
    "resumption": "Read existing job/result evidence; new call starts new operation, not sealed-step continuation",
    "verification": "Canonical file hash/text, configured syntax validator, command exit and HTTP probes as applicable"
  },
  "desired_but_not_implemented": {
    "goal": "Goal in, recursively observe/decide/act until externally verified completion",
    "requires": [
      "Goal/done_when/verification schema",
      "Defined allowed fallback graph",
      "Durable checkpoints and unknown-outcome reconciliation",
      "Side-effect idempotency and receipt-based resumption",
      "Runtime/context progress accounting",
      "Optional authorized planner and independent verification"
    ],
    "status": "Design dependencies only; these are not executable CODE fields"
  },
  "invocation_methods": [
    {
      "way": "curl",
      "label": "REST (curl)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/run",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "tool": "CODE",
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "named",
      "label": "REST, named arguments (curl)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/run",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "tool": "CODE",
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "url",
      "label": "Link (one URL)",
      "contract": {
        "method": "GET",
        "url": "https://miscsubjects.com/api/run?tool=CODE&args=%7B%22op%22%3A%22schema%22%7D",
        "headers": {}
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "jsonrpc",
      "label": "MCP over HTTP (JSON-RPC)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/mcp",
        "headers": {
          "authorization": "Bearer <KEY>",
          "accept": "application/json, text/event-stream",
          "content-type": "application/json"
        },
        "body": {
          "jsonrpc": "2.0",
          "id": 1,
          "method": "tools/call",
          "params": {
            "name": "CODE",
            "arguments": {
              "args": {
                "op": "schema"
              }
            }
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "claude_code",
      "label": "MCP client (Claude Code)",
      "contract": {
        "method": "MCP",
        "server": "https://miscsubjects.com/mcp",
        "headers": {
          "Authorization": "Bearer <KEY>"
        },
        "tool": "CODE",
        "arguments": {
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "misc",
      "label": "misc CLI",
      "contract": {
        "method": "CLI",
        "command": "misc run CODE '{\"op\":\"schema\"}'"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "console_app",
      "label": "console-app CLI",
      "contract": {
        "method": "CLI",
        "command": "console-app call CODE '{\"op\":\"schema\"}'"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "line",
      "label": "One line of text",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/line",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "line": "run CODE {\"op\":\"schema\"}"
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "tag",
      "label": "Tag ([KEY][/KEY])",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/tag",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "text": "[CODE]{\"op\":\"schema\"}[/CODE]"
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "shortcut",
      "label": "Apple Shortcut",
      "contract": {
        "method": "CLI",
        "command": "printf '%s' '{\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "webhook",
      "label": "Webhook",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/hook/hk_runtools/CODE",
        "headers": {
          "content-type": "application/json"
        },
        "body": {
          "op": "schema"
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "upstream",
      "label": "Upstream (straight to the service)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/run",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "tool": "CODE",
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "shell",
      "label": "Command line (Mac)",
      "contract": {
        "method": "CLI",
        "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}'"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "sdk",
      "label": "SDK method (client library)",
      "contract": {
        "method": "CODE",
        "language": "javascript",
        "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"CODE\", {\"op\":\"schema\"})));"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "function_direct",
      "label": "Direct function call",
      "contract": {
        "method": "CODE",
        "language": "javascript",
        "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"CODE\", {\"op\":\"schema\"}, \"<KEY>\")));"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "mcp_stdio",
      "label": "MCP over stdio",
      "contract": {
        "method": "CLI",
        "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"CODE\",\"arguments\":{\"args\":{\"op\":\"schema\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "websocket",
      "label": "WebSocket",
      "contract": {
        "method": "CODE",
        "language": "javascript",
        "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "client_wait_ms": 10000,
        "meaning": "Generated example client wait, not an executor/model cap"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "sse",
      "label": "Server-sent events",
      "contract": {
        "method": "CLI",
        "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=CODE&args=%7B%22op%22%3A%22schema%22%7D' --max-time 30"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "client_wait_seconds": 30,
        "meaning": "Generated curl example client wait, not executor cancellation"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "graphql",
      "label": "GraphQL",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/graphql",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
          "variables": {
            "tool": "CODE",
            "args": {
              "op": "schema"
            }
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "ssh",
      "label": "SSH / remote exec",
      "contract": {
        "method": "CLI",
        "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run CODE '\\''{\"op\":\"schema\"}'\\'''"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Corresponding local CLI/runtime/package/Shortcut/SSH installation and configured authentication"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "run",
      "label": "This build: REST (/api/run)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/run",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "tool": "CODE",
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "mcp",
      "label": "This build\u2019s MCP server (/mcp)",
      "contract": {
        "method": "MCP",
        "server": "https://miscsubjects.com/mcp",
        "headers": {
          "Authorization": "Bearer <KEY>"
        },
        "tool": "CODE",
        "arguments": {
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "oip",
      "label": "OIP (POST /api/dispatch, this build\u2019s door)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/dispatch",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "key": "CODE",
          "args": {
            "op": "schema"
          }
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "oip_shape",
      "label": "OIP dry run (the call written out, never sent)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/dispatch",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "key": "CODE",
          "args": {
            "op": "schema"
          },
          "shape": true
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Dry-run shape; never executes CODE",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "token",
      "label": "Link with a token (this tool only, no key)",
      "contract": null,
      "availability": "Requires a tool-scoped standing token; generated at authenticated contracts endpoint if configured",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "web_get",
      "label": "Web GET for a browser model (/web/run)",
      "contract": null,
      "availability": "Requires a tool-scoped standing token; generated at authenticated contracts endpoint if configured",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "slug",
      "label": "The tool\u2019s own address (/s/TOOL, with a token)",
      "contract": null,
      "availability": "Requires a tool-scoped standing token; generated at authenticated contracts endpoint if configured",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "function_call",
      "label": "Function call (a model\u2019s tool call, as it wrote it)",
      "contract": {
        "method": "POST",
        "url": "https://miscsubjects.com/api/tools/call",
        "headers": {
          "x-sheets-key": "<KEY>",
          "content-type": "application/json"
        },
        "body": {
          "name": "CODE",
          "arguments": "{\"op\":\"schema\"}"
        }
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "js",
      "label": "JavaScript (fetch)",
      "contract": {
        "method": "CODE",
        "language": "javascript",
        "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"CODE\",\"args\":{\"op\":\"schema\"}}),\n});\nconsole.log(r.status, await r.text());"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "maximum": "UNKNOWN: adapter/platform limits; no separate CODE-specific bound"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    },
    {
      "way": "python",
      "label": "Python (requests)",
      "contract": {
        "method": "CODE",
        "language": "python",
        "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"CODE\", \"args\": {\"op\": \"schema\"}}, timeout=300)\nprint(r.status_code, r.text)"
      },
      "availability": "Generated, execution not established by generation",
      "credential_binding": {
        "<KEY>": {
          "location": "/Users/cyrusmassoumi/.misc-sheets-key",
          "resolve": "Read this file in the caller; the authenticated contracts endpoint expands the live transport credential without storing it in this blob",
          "resolve_command": "cat /Users/cyrusmassoumi/.misc-sheets-key"
        }
      },
      "dependencies": [
        "Reachable build endpoint and accepted authentication/session/token"
      ],
      "returns": "Semantic CODE response through adapter wrapper",
      "adapter_limits": {
        "client_wait_seconds": 300,
        "meaning": "Generated requests example client wait, not executor cancellation"
      },
      "execution_contract": "All input, dependencies, bounds, responses and failure rules in this containing JSON apply to this method; execution metadata is not sent as args"
    }
  ],
  "response_schema": {
    "description": "Reduced semantic result after decoding native text or adapter wrapper; schema and pre-execution errors are separate variants.",
    "type": "object",
    "required": [
      "ok",
      "status",
      "data",
      "full_ref",
      "return_size"
    ],
    "additionalProperties": false,
    "properties": {
      "ok": {
        "type": "boolean"
      },
      "status": {
        "type": "string",
        "description": "Full outcome status preserved; defaults done"
      },
      "error": {
        "type": "string"
      },
      "data": {
        "description": "Any valid JSON value; selected keys use literal dotted path names"
      },
      "full_ref": {
        "type": "object",
        "required": [
          "tool",
          "args"
        ],
        "properties": {
          "tool": {
            "const": "CODE"
          },
          "args": {
            "type": "object",
            "required": [
              "op",
              "ref"
            ],
            "properties": {
              "op": {
                "const": "result"
              },
              "ref": {
                "type": "string",
                "pattern": "^coding/results/[a-f0-9-]+\\.json$"
              }
            }
          }
        }
      },
      "job_id": {
        "type": "string"
      },
      "job_ref": {
        "type": "object",
        "required": [
          "tool",
          "args"
        ],
        "properties": {
          "tool": {
            "const": "CODE"
          },
          "args": {
            "type": "object",
            "required": [
              "op",
              "job_id"
            ],
            "properties": {
              "op": {
                "const": "job"
              },
              "job_id": {
                "type": "string",
                "pattern": "^[a-f0-9-]{36}$"
              }
            }
          }
        }
      },
      "return_size": {
        "type": "object",
        "required": [
          "scope",
          "unit",
          "original",
          "returned",
          "maximum",
          "omitted"
        ],
        "additionalProperties": false,
        "properties": {
          "scope": {
            "const": "data"
          },
          "unit": {
            "const": "bytes"
          },
          "original": {
            "type": "integer",
            "minimum": 0
          },
          "returned": {
            "type": "integer",
            "minimum": 0
          },
          "maximum": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "omitted": {
            "type": "boolean"
          },
          "budget_unrepresentable": {
            "const": true
          }
        }
      }
    }
  },
  "response_schema_variants": [
    {
      "when": "op=schema",
      "required_fields": [
        "description",
        "input_schema",
        "return_contract",
        "grammar"
      ],
      "reduced_envelope": false
    },
    {
      "when": "Runner rejects args or bridge/store throws before reduction",
      "shape": "Runner/HTTP/MCP error wrapper; full_ref not guaranteed"
    },
    {
      "when": "Execution outcome reaches reduction",
      "schema": "response_schema"
    }
  ],
  "operation_requirements": {
    "description": "Operation-specific requirements; dynamic hash/source conditions remain in runtime_fields.",
    "allOf": [
      {
        "if": {
          "properties": {
            "op": {
              "const": "edit"
            }
          }
        },
        "then": {
          "required": [
            "edits"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "write"
            }
          }
        },
        "then": {
          "required": [
            "content"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "grep"
            }
          }
        },
        "then": {
          "required": [
            "pattern"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "grammar"
            }
          }
        },
        "then": {
          "required": [
            "text"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "ship"
            }
          }
        },
        "then": {
          "required": [
            "changes"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "job"
            }
          }
        },
        "then": {
          "required": [
            "job_id"
          ]
        }
      },
      {
        "if": {
          "properties": {
            "op": {
              "const": "result"
            }
          }
        },
        "then": {
          "anyOf": [
            {
              "required": [
                "ref"
              ]
            },
            {
              "required": [
                "job_id"
              ]
            }
          ]
        }
      }
    ],
    "path_caveat": "No required path is asserted: current buildPath defaults absent path to workspace root, which fails canonical file read. Caller should supply file path."
  }
}
```

### WEB (29/30 ways)

Atomic local internet search/read/site lookup. Internal search, Safari/Alfred reads, declared fallback and literal verification; complete results stored before selectable return budget. op=schema|search|read|sites|discover|result. q shorthand, url direct read; no models called.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "WEB",
    "args": {
      "op": "schema"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "WEB",
    "args": {
      "op": "schema"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=WEB&args=%7B%22op%22%3A%22schema%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "WEB",
      "arguments": {
        "args": {
          "op": "schema"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "WEB",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run WEB '{\"op\":\"schema\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call WEB '{\"op\":\"schema\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run WEB {\"op\":\"schema\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[WEB]{\"op\":\"schema\"}[/WEB]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"WEB\",\"args\":{\"op\":\"schema\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/WEB",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "op": "schema"
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"WEB\",\"args\":{\"op\":\"schema\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"WEB\", {\"op\":\"schema\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"WEB\", {\"op\":\"schema\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"WEB\",\"arguments\":{\"args\":{\"op\":\"schema\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"WEB\",\"args\":{\"op\":\"schema\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=WEB&args=%7B%22op%22%3A%22schema%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "WEB",
      "args": {
        "op": "schema"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run WEB '\\''{\"op\":\"schema\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "WEB",
    "args": {
      "op": "schema"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "WEB",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "WEB",
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "WEB",
    "args": {
      "op": "schema"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/WEB?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/WEB?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/WEB?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "WEB",
    "arguments": "{\"op\":\"schema\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"WEB\",\"args\":{\"op\":\"schema\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"WEB\", \"args\": {\"op\": \"schema\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

**Execution contract**

```json
{
  "contract_version": "miscsubjects/WEB/execution/1",
  "tool": "WEB",
  "input_schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "op": {
        "enum": [
          "schema",
          "search",
          "read",
          "sites",
          "discover",
          "result"
        ]
      },
      "q": {
        "type": "string"
      },
      "query": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "site": {
        "type": "string"
      },
      "template": {
        "type": "string"
      },
      "domain": {
        "type": "string"
      },
      "count": {
        "type": "integer",
        "minimum": 1,
        "maximum": 10
      },
      "read": {
        "type": "integer",
        "minimum": 0,
        "maximum": 5
      },
      "smart": {
        "type": "boolean",
        "default": true,
        "description": "Use the declared fallback table; no model calls or hidden planning"
      },
      "verify": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "contains": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ref": {
        "type": "string"
      },
      "return": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "select": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "mode": {
            "enum": [
              "selected",
              "full",
              "reference"
            ]
          }
        }
      }
    }
  },
  "dependencies": [
    "LINE_SEARCH: local internet search",
    "PAGE_JSON: Alfred pagejson workflow -> local Safari",
    "SITE_SEARCH: named/template/OpenSearch searches",
    "STORE: complete results",
    "Ledger: invocation and return evidence"
  ],
  "execution": {
    "search": [
      "LINE_SEARCH search without page bodies",
      "PAGE_JSON for requested top URLs",
      "verify text when requested"
    ],
    "read": [
      "PAGE_JSON",
      "LINE_SEARCH read on failure only when smart is true",
      "verify text when requested"
    ],
    "site": [
      "SITE_SEARCH",
      "LINE_SEARCH read of the constructed URL on failure only when smart is true",
      "verify text when requested"
    ]
  },
  "fallback": {
    "search_failure": "SITE_SEARCH google with same query",
    "page_failure": "LINE_SEARCH read same URL; response identifies partial text",
    "verification_failure": "Return verification_failed with all received evidence; never claim completion or silently retry mutations"
  },
  "returns": {
    "default": "status, citations, counts, verification, step statuses, full_ref; no page bodies",
    "full": "all received step returns and full Safari page bodies",
    "budget": "return.max_bytes bounds data only; omit whole fields/records, never cut serialized JSON. Envelope and retrieval ref remain.",
    "retrieval": {
      "tool": "WEB",
      "args": {
        "op": "result",
        "ref": "reference returned by original call",
        "return": {
          "mode": "full"
        }
      }
    }
  },
  "boundaries": [
    "Read-only pages; no click, send or purchase",
    "No LLM called",
    "No unlimited recursive search; deterministic finite fallback graph",
    "A site may return login/challenge content; verify.contains tests literal text, not semantic truth",
    "Legacy LINE_SEARCH fallback limits text; original helper reply retained in Ledger, and each fallback page is marked partial",
    "Mac must be online; Safari and Alfred must be available",
    "Browser/session login is Safari, not isolated COMPUTER browser or Chrome"
  ],
  "methods": [
    "REST /api/run",
    "MCP tools/call",
    "Directory-generated invocation adapters share the same native function"
  ]
}
```

### COMPUTER (29/30 ways)

COMPUTER: semantic browser procedures on an isolated persistent browser on the owner Mac. op=schema|see|run|map|result. A run accepts steps or conditional rules, unique label/role targets, done_when and verify; acts and verifies internally without model round trips. Returns done/ambiguous/target_missing/needs_plan/stalled/transition_failed with graph and receipts. map visits only explicitly listed same-origin read-only URLs. Full payloads are stored; return.max_bytes budgets selected data only. No model calls, confidence scores, autonomous goal planner, screenshots, native desktop control, or model limits.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "COMPUTER",
    "args": {
      "op": "schema"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "COMPUTER",
    "args": {
      "op": "schema"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=COMPUTER&args=%7B%22op%22%3A%22schema%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "COMPUTER",
      "arguments": {
        "args": {
          "op": "schema"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "COMPUTER",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run COMPUTER '{\"op\":\"schema\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call COMPUTER '{\"op\":\"schema\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run COMPUTER {\"op\":\"schema\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[COMPUTER]{\"op\":\"schema\"}[/COMPUTER]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"COMPUTER\",\"args\":{\"op\":\"schema\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/COMPUTER",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "op": "schema"
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"COMPUTER\",\"args\":{\"op\":\"schema\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"COMPUTER\", {\"op\":\"schema\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"COMPUTER\", {\"op\":\"schema\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"COMPUTER\",\"arguments\":{\"args\":{\"op\":\"schema\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"COMPUTER\",\"args\":{\"op\":\"schema\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=COMPUTER&args=%7B%22op%22%3A%22schema%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "COMPUTER",
      "args": {
        "op": "schema"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run COMPUTER '\\''{\"op\":\"schema\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "COMPUTER",
    "args": {
      "op": "schema"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "COMPUTER",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "COMPUTER",
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "COMPUTER",
    "args": {
      "op": "schema"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/COMPUTER?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/COMPUTER?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/COMPUTER?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "COMPUTER",
    "arguments": "{\"op\":\"schema\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"COMPUTER\",\"args\":{\"op\":\"schema\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"COMPUTER\", \"args\": {\"op\": \"schema\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

**Execution contract**

```json
{
  "contract_version": "miscsubjects/COMPUTER/execution/1",
  "tool": "COMPUTER",
  "description": "COMPUTER: semantic browser procedures on an isolated persistent browser on the owner Mac. op=schema|see|run|map|result. A run accepts steps or conditional rules, unique label/role targets, done_when and verify; acts and verifies internally without model round trips. Returns done/ambiguous/target_missing/needs_plan/stalled/transition_failed with graph and receipts. map visits only explicitly listed same-origin read-only URLs. Full payloads are stored; return.max_bytes budgets selected data only. No model calls, confidence scores, autonomous goal planner, screenshots, native desktop control, or model limits.",
  "input_schema": {
    "type": "object",
    "required": [
      "op"
    ],
    "additionalProperties": false,
    "properties": {
      "op": {
        "type": "string",
        "enum": [
          "schema",
          "see",
          "run",
          "map",
          "result"
        ]
      },
      "session": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "urls": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "do",
            "expect"
          ],
          "properties": {
            "do": {
              "type": "string",
              "enum": [
                "click",
                "fill",
                "press",
                "navigate"
              ]
            },
            "target": {
              "type": "object",
              "required": [
                "text"
              ],
              "properties": {
                "text": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "exact": {
                  "type": "boolean"
                },
                "within": {
                  "type": "object",
                  "required": [
                    "role",
                    "text"
                  ],
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "value": {
              "type": "string"
            },
            "key": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "expect": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "control": {
                      "type": "object",
                      "required": [
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "exact": {
                          "type": "boolean"
                        },
                        "within": {
                          "type": "object",
                          "required": [
                            "role",
                            "text"
                          ],
                          "properties": {
                            "role": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                }
              ]
            },
            "when": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "control": {
                      "type": "object",
                      "required": [
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "exact": {
                          "type": "boolean"
                        },
                        "within": {
                          "type": "object",
                          "required": [
                            "role",
                            "text"
                          ],
                          "properties": {
                            "role": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                }
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "rules": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "do",
            "expect"
          ],
          "properties": {
            "do": {
              "type": "string",
              "enum": [
                "click",
                "fill",
                "press",
                "navigate"
              ]
            },
            "target": {
              "type": "object",
              "required": [
                "text"
              ],
              "properties": {
                "text": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "exact": {
                  "type": "boolean"
                },
                "within": {
                  "type": "object",
                  "required": [
                    "role",
                    "text"
                  ],
                  "properties": {
                    "role": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "value": {
              "type": "string"
            },
            "key": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "expect": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "control": {
                      "type": "object",
                      "required": [
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "exact": {
                          "type": "boolean"
                        },
                        "within": {
                          "type": "object",
                          "required": [
                            "role",
                            "text"
                          ],
                          "properties": {
                            "role": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                }
              ]
            },
            "when": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "control": {
                      "type": "object",
                      "required": [
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        },
                        "exact": {
                          "type": "boolean"
                        },
                        "within": {
                          "type": "object",
                          "required": [
                            "role",
                            "text"
                          ],
                          "properties": {
                            "role": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false,
                  "minProperties": 1
                }
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "done_when": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "control": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "exact": {
                    "type": "boolean"
                  },
                  "within": {
                    "type": "object",
                    "required": [
                      "role",
                      "text"
                    ],
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "minProperties": 1
          }
        ]
      },
      "verify": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "control": {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "exact": {
                    "type": "boolean"
                  },
                  "within": {
                    "type": "object",
                    "required": [
                      "role",
                      "text"
                    ],
                    "properties": {
                      "role": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "minProperties": 1
          }
        ]
      },
      "wait_ms": {
        "type": "integer",
        "minimum": 0,
        "description": "UI transition wait; does not cap a model or the number of steps"
      },
      "ref": {
        "type": "string"
      },
      "return": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "max_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "mode": {
            "type": "string",
            "enum": [
              "full",
              "selected",
              "reference"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  },
  "execution": {
    "executor": "Mac recording runner",
    "program": "/Users/cyrusmassoumi/misc-sheets/mac/computer.mjs",
    "browser": "existing bridge Playwright isolated persistent context; does not control foreground Chrome",
    "session_storage": "~/.misc-sheets/computer/<session>/browser",
    "graph_storage": "~/.misc-sheets/computer/<session>/graph.json",
    "receipt_storage": "~/.misc-sheets/computer/<session>/receipts.jsonl",
    "model_calls": 0,
    "planner": "Caller-supplied steps or rules, then verified graph paths. An unknown goal returns needs_plan; no LLM classifier or navigator is connected."
  },
  "limits": {
    "model_caps": null,
    "step_cap": null,
    "default_ui_wait_ms": 10000,
    "ui_wait_ms": {
      "min": 0,
      "max": "none enforced; UI waits only"
    },
    "return_max_bytes": {
      "min": 0,
      "max": "caller-supplied; scope is data only"
    },
    "map_pages": "finite explicitly supplied URLs; same origin; no submissions to discover a route",
    "full_payload": "stored whole before response reduction; no clipped JSON fields"
  },
  "state_machine": {
    "done": "done_when and verify both match live browser state",
    "ambiguous": "multiple rules or multiple target controls; no selection by first match",
    "target_missing": "zero matching controls",
    "needs_plan": "no applicable rule or previously verified route",
    "exhausted": "explicit steps ended before done_when",
    "stalled": "unchanged semantic state or repeated state/action pair",
    "transition_failed": "expected semantic transition did not appear",
    "action_failed": "browser primitive threw; failure captured verbatim",
    "verification_failed": "done_when matched but verify did not",
    "mapped": "each declared map URL read and recorded without changing main page",
    "observed": "semantic snapshot recorded"
  },
  "recovery": {
    "known_routes": "breadth-first traversal of verified edges; each replayed step verifies again",
    "ambiguous": "caller or separately configured planner must provide a scoped target or new rule",
    "failure": "stop with receipts; no speculative retry or generic rollback",
    "transaction": "single invocation may perform multiple actions; it is not an all-or-nothing transaction"
  },
  "return_contract": {
    "default": "status, steps, session, final-state address, graph counts, full_ref; bodies remain in stored result",
    "full": "return.mode=full returns entire raw result",
    "selected": "return.fields chooses top-level fields; max_bytes omits data as a whole if over budget",
    "full_ref": {
      "tool": "COMPUTER",
      "args": {
        "op": "result",
        "ref": "computer/results/<UUID>.json"
      }
    },
    "budget_scope": "serialized data only; status/error/refs are outside the budget",
    "never_loss": "whole browser result saved under computer/results/<UUID>.json in the build object store and Ledger before reduction"
  },
  "dependencies": {
    "mac_runner": "env.TERMINAL_KEY or env.BUILD_KEY; no credential values in this contract",
    "browser_runtime": "~/bin/bridge pw_entry() and pw_chrome()",
    "storage": "env.STORE object-store interface; live /api/storage currently reports Supabase",
    "directory": "COMPUTER row",
    "mcp_schema": "src/tools/computer.js MCP_SCHEMA"
  }
}
```

### RESULT (29/30 ways)

Read back any previous tool call and take only the part of its answer you need. {call_id} every row of that one call. {call_id, grep} only the lines matching a pattern (case-insensitive, or a real regex if the pattern is /wrapped/ in slashes), each with its line number and 120 characters either side. {call_id, from, to} a byte range, to page through a large answer. {call_id, json} one dotted path into the answer parsed as JSON, e.g. results.0.url. {grep} with no call_id searches the newest Ledger payloads and names which rows matched, which is how you find a call_id. {tail} the rows before a cursor. Every answer says how many bytes the whole payload was and how many were returned, so nothing is ever silently cut. Read-only: it reads the Ledger and writes nothing. Use it instead of asking for a whole large answer twice.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "RESULT",
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "RESULT",
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=RESULT&args=%7B%22grep%22%3A%22error%22%2C%22rows%22%3A20%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "RESULT",
      "arguments": {
        "args": {
          "grep": "error",
          "rows": 20
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "RESULT",
  "arguments": {
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run RESULT '{\"grep\":\"error\",\"rows\":20}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call RESULT '{\"grep\":\"error\",\"rows\":20}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run RESULT {\"grep\":\"error\",\"rows\":20}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[RESULT]{\"grep\":\"error\",\"rows\":20}[/RESULT]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"RESULT\",\"args\":{\"grep\":\"error\",\"rows\":20}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/RESULT",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "grep": "error",
    "rows": 20
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"RESULT\",\"args\":{\"grep\":\"error\",\"rows\":20}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"RESULT\", {\"grep\":\"error\",\"rows\":20})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"RESULT\", {\"grep\":\"error\",\"rows\":20}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"RESULT\",\"arguments\":{\"args\":{\"grep\":\"error\",\"rows\":20}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"RESULT\",\"args\":{\"grep\":\"error\",\"rows\":20}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=RESULT&args=%7B%22grep%22%3A%22error%22%2C%22rows%22%3A20%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "RESULT",
      "args": {
        "grep": "error",
        "rows": 20
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run RESULT '\\''{\"grep\":\"error\",\"rows\":20}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "RESULT",
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "RESULT",
  "arguments": {
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "RESULT",
    "args": {
      "grep": "error",
      "rows": 20
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "RESULT",
    "args": {
      "grep": "error",
      "rows": 20
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/RESULT?args=%7B%22grep%22%3A%22error%22%2C%22rows%22%3A20%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/RESULT?args=%7B%22grep%22%3A%22error%22%2C%22rows%22%3A20%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/RESULT?args=%7B%22grep%22%3A%22error%22%2C%22rows%22%3A20%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "RESULT",
    "arguments": "{\"grep\":\"error\",\"rows\":20}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"RESULT\",\"args\":{\"grep\":\"error\",\"rows\":20}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"RESULT\", \"args\": {\"grep\": \"error\", \"rows\": 20}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### ARTICLE (30/30 ways)

Unified article tool: schema, list, read, at, grep, create, replace, patch, delete, verify, publish, comment, cli, theme, theme_patch, models and result. An article is one JSON object (jarticle/1). Reads answer the hash; changes need it. publish writes, fetches and hashes every source, and publishes only when every quote is found, in one call. return.select / return.max_bytes budget the answer; the whole result stays at full_ref. No model is called.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ARTICLE",
    "args": {
      "op": "schema"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ARTICLE",
    "args": {
      "op": "schema"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=ARTICLE&args=%7B%22op%22%3A%22schema%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "ARTICLE",
      "arguments": {
        "args": {
          "op": "schema"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "ARTICLE",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run ARTICLE '{\"op\":\"schema\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call ARTICLE '{\"op\":\"schema\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run ARTICLE {\"op\":\"schema\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[ARTICLE]{\"op\":\"schema\"}[/ARTICLE]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"ARTICLE\",\"args\":{\"op\":\"schema\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/ARTICLE",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "op": "schema"
  }
}
```

**Upstream (straight to the service)** (`upstream`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ARTICLE",
    "args": {
      "op": "schema"
    }
  }
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"ARTICLE\",\"args\":{\"op\":\"schema\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"ARTICLE\", {\"op\":\"schema\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"ARTICLE\", {\"op\":\"schema\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"ARTICLE\",\"arguments\":{\"args\":{\"op\":\"schema\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"ARTICLE\",\"args\":{\"op\":\"schema\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=ARTICLE&args=%7B%22op%22%3A%22schema%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "ARTICLE",
      "args": {
        "op": "schema"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run ARTICLE '\\''{\"op\":\"schema\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "$(cat /Users/cyrusmassoumi/.misc-sheets-key)",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ARTICLE",
    "args": {
      "op": "schema"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "ARTICLE",
  "arguments": {
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "ARTICLE",
    "args": {
      "op": "schema"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "ARTICLE",
    "args": {
      "op": "schema"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/ARTICLE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/ARTICLE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/ARTICLE?args=%7B%22op%22%3A%22schema%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "ARTICLE",
    "arguments": "{\"op\":\"schema\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"ARTICLE\",\"args\":{\"op\":\"schema\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"ARTICLE\", \"args\": {\"op\": \"schema\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### LINE_SEARCH (29/30 ways)

Search the web and read pages from YOUR OWN internet line (the Mac on Starlink: a home address, not a data centre) and get one fixed shape back: results[{n,title,url,snippet,date,engines,text,highlights}], citations[{n,title,url}] (number them [1],[2] in an answer), egress, cost_usd (always 0: the line has no fee per call), usage, errors. No model is called and nothing is paid. highlights are the sentences that hold the query's words, cut by rule. Args (one JSON object): query (required unless url) · mode: search (results only) | search_read (default: results plus the text of the first `read` pages) | read (url or urls, up to 5, rendered in a headless browser on the Mac so JavaScript runs) · count 1-10 (default 5) · read 1-5 (default 3) · max_chars 200-60000 (default 6000) · highlights true|false · engines ["ddg","mojeek"]. Runs through the Mac exec bridge (needs the Mac on). Search engines throttle a line that searches too fast: keep bursts small.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "LINE_SEARCH",
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "LINE_SEARCH",
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=LINE_SEARCH&args=%7B%22query%22%3A%22med%20spa%20Scottsdale%20AZ%22%2C%22mode%22%3A%22search_read%22%2C%22count%22%3A5%2C%22read%22%3A3%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "LINE_SEARCH",
      "arguments": {
        "args": {
          "query": "med spa Scottsdale AZ",
          "mode": "search_read",
          "count": 5,
          "read": 3
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "LINE_SEARCH",
  "arguments": {
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run LINE_SEARCH '{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call LINE_SEARCH '{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run LINE_SEARCH {\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[LINE_SEARCH]{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}[/LINE_SEARCH]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"LINE_SEARCH\",\"args\":{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/LINE_SEARCH",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "query": "med spa Scottsdale AZ",
    "mode": "search_read",
    "count": 5,
    "read": 3
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"LINE_SEARCH\",\"args\":{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"LINE_SEARCH\", {\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"LINE_SEARCH\", {\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"LINE_SEARCH\",\"arguments\":{\"args\":{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"LINE_SEARCH\",\"args\":{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=LINE_SEARCH&args=%7B%22query%22%3A%22med%20spa%20Scottsdale%20AZ%22%2C%22mode%22%3A%22search_read%22%2C%22count%22%3A5%2C%22read%22%3A3%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "LINE_SEARCH",
      "args": {
        "query": "med spa Scottsdale AZ",
        "mode": "search_read",
        "count": 5,
        "read": 3
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run LINE_SEARCH '\\''{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "LINE_SEARCH",
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "LINE_SEARCH",
  "arguments": {
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "LINE_SEARCH",
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "LINE_SEARCH",
    "args": {
      "query": "med spa Scottsdale AZ",
      "mode": "search_read",
      "count": 5,
      "read": 3
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/LINE_SEARCH?args=%7B%22query%22%3A%22med%20spa%20Scottsdale%20AZ%22%2C%22mode%22%3A%22search_read%22%2C%22count%22%3A5%2C%22read%22%3A3%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/LINE_SEARCH?args=%7B%22query%22%3A%22med%20spa%20Scottsdale%20AZ%22%2C%22mode%22%3A%22search_read%22%2C%22count%22%3A5%2C%22read%22%3A3%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/LINE_SEARCH?args=%7B%22query%22%3A%22med%20spa%20Scottsdale%20AZ%22%2C%22mode%22%3A%22search_read%22%2C%22count%22%3A5%2C%22read%22%3A3%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "LINE_SEARCH",
    "arguments": "{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"LINE_SEARCH\",\"args\":{\"query\":\"med spa Scottsdale AZ\",\"mode\":\"search_read\",\"count\":5,\"read\":3}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"LINE_SEARCH\", \"args\": {\"query\": \"med spa Scottsdale AZ\", \"mode\": \"search_read\", \"count\": 5, \"read\": 3}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### PAGE_JSON (29/30 ways)

Read one web page as JSON through a background tab of YOUR Safari: url, title, headings, visible text, links, controls (never input values or passwords). Your own tab stays current and the tab it opens is closed. Runs through Alfred's Line Search workflow because the Mac exec bridge refuses commands that name a browser. Args: url (required, http or https). Returns {tool, ok, page{...}, errors[], cost_usd:0}. One at a time.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "PAGE_JSON",
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "PAGE_JSON",
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=PAGE_JSON&args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "PAGE_JSON",
      "arguments": {
        "args": {
          "url": "https://example.com"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "PAGE_JSON",
  "arguments": {
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run PAGE_JSON '{\"url\":\"https://example.com\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call PAGE_JSON '{\"url\":\"https://example.com\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run PAGE_JSON {\"url\":\"https://example.com\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[PAGE_JSON]{\"url\":\"https://example.com\"}[/PAGE_JSON]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"PAGE_JSON\",\"args\":{\"url\":\"https://example.com\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/PAGE_JSON",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "url": "https://example.com"
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"PAGE_JSON\",\"args\":{\"url\":\"https://example.com\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"PAGE_JSON\", {\"url\":\"https://example.com\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"PAGE_JSON\", {\"url\":\"https://example.com\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"PAGE_JSON\",\"arguments\":{\"args\":{\"url\":\"https://example.com\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"PAGE_JSON\",\"args\":{\"url\":\"https://example.com\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=PAGE_JSON&args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "PAGE_JSON",
      "args": {
        "url": "https://example.com"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run PAGE_JSON '\\''{\"url\":\"https://example.com\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "PAGE_JSON",
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "PAGE_JSON",
  "arguments": {
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "PAGE_JSON",
    "args": {
      "url": "https://example.com"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "PAGE_JSON",
    "args": {
      "url": "https://example.com"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/PAGE_JSON?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/PAGE_JSON?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/PAGE_JSON?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "PAGE_JSON",
    "arguments": "{\"url\":\"https://example.com\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"PAGE_JSON\",\"args\":{\"url\":\"https://example.com\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"PAGE_JSON\", \"args\": {\"url\": \"https://example.com\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### SITE_SEARCH (29/30 ways)

Search any site the way Alfred's Web Search does and read the results page as JSON through YOUR Safari (so a site you are signed in to answers as you). Args: site (google, images, maps, translate, gmail, drive, x, wiki, amazon, imdb, ebay, bing, yahoo, ask, linkedin, youtube, facebook, flickr, wolfram, duck, rotten, pinterest, reddit) or template (https://…{query}…), and query; or op:"sites" to list them. Read only: it never clicks. Returns {tool, ok, site, url, page{title, text, links, controls}, errors[]}. One at a time.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SEARCH",
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SEARCH",
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=SITE_SEARCH&args=%7B%22site%22%3A%22wiki%22%2C%22query%22%3A%22starlink%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "SITE_SEARCH",
      "arguments": {
        "args": {
          "site": "wiki",
          "query": "starlink"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "SITE_SEARCH",
  "arguments": {
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run SITE_SEARCH '{\"site\":\"wiki\",\"query\":\"starlink\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call SITE_SEARCH '{\"site\":\"wiki\",\"query\":\"starlink\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run SITE_SEARCH {\"site\":\"wiki\",\"query\":\"starlink\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[SITE_SEARCH]{\"site\":\"wiki\",\"query\":\"starlink\"}[/SITE_SEARCH]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"SITE_SEARCH\",\"args\":{\"site\":\"wiki\",\"query\":\"starlink\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/SITE_SEARCH",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "site": "wiki",
    "query": "starlink"
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"SITE_SEARCH\",\"args\":{\"site\":\"wiki\",\"query\":\"starlink\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"SITE_SEARCH\", {\"site\":\"wiki\",\"query\":\"starlink\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"SITE_SEARCH\", {\"site\":\"wiki\",\"query\":\"starlink\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"SITE_SEARCH\",\"arguments\":{\"args\":{\"site\":\"wiki\",\"query\":\"starlink\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"SITE_SEARCH\",\"args\":{\"site\":\"wiki\",\"query\":\"starlink\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=SITE_SEARCH&args=%7B%22site%22%3A%22wiki%22%2C%22query%22%3A%22starlink%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "SITE_SEARCH",
      "args": {
        "site": "wiki",
        "query": "starlink"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run SITE_SEARCH '\\''{\"site\":\"wiki\",\"query\":\"starlink\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SEARCH",
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "SITE_SEARCH",
  "arguments": {
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "SITE_SEARCH",
    "args": {
      "site": "wiki",
      "query": "starlink"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "SITE_SEARCH",
    "args": {
      "site": "wiki",
      "query": "starlink"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/SITE_SEARCH?args=%7B%22site%22%3A%22wiki%22%2C%22query%22%3A%22starlink%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/SITE_SEARCH?args=%7B%22site%22%3A%22wiki%22%2C%22query%22%3A%22starlink%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/SITE_SEARCH?args=%7B%22site%22%3A%22wiki%22%2C%22query%22%3A%22starlink%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "SITE_SEARCH",
    "arguments": "{\"site\":\"wiki\",\"query\":\"starlink\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"SITE_SEARCH\",\"args\":{\"site\":\"wiki\",\"query\":\"starlink\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"SITE_SEARCH\", \"args\": {\"site\": \"wiki\", \"query\": \"starlink\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### SITE_SCRAPE (29/30 ways)

Point it at a website: the Mac reads the site page by page (same site only) in its own headless browser and files what it found in ~/Downloads/scrapes/<host>-<date>/: pages.json (text, links, tables, form field labels; never values), documents.csv (every linked pdf/doc/xls...), contacts.csv (emails, phones), dates_money.csv, summary.json, and the documents themselves with download. Args: url (required), pages 1-100 (15), depth 0-4 (2), under_path, download. Answers with the summary and the folder.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SCRAPE",
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SCRAPE",
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=SITE_SCRAPE&args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%2C%22pages%22%3A3%2C%22depth%22%3A1%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "SITE_SCRAPE",
      "arguments": {
        "args": {
          "url": "https://example.com",
          "pages": 3,
          "depth": 1
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "SITE_SCRAPE",
  "arguments": {
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run SITE_SCRAPE '{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call SITE_SCRAPE '{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run SITE_SCRAPE {\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[SITE_SCRAPE]{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}[/SITE_SCRAPE]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"SITE_SCRAPE\",\"args\":{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/SITE_SCRAPE",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "url": "https://example.com",
    "pages": 3,
    "depth": 1
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"SITE_SCRAPE\",\"args\":{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"SITE_SCRAPE\", {\"url\":\"https://example.com\",\"pages\":3,\"depth\":1})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"SITE_SCRAPE\", {\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"SITE_SCRAPE\",\"arguments\":{\"args\":{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"SITE_SCRAPE\",\"args\":{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=SITE_SCRAPE&args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%2C%22pages%22%3A3%2C%22depth%22%3A1%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "SITE_SCRAPE",
      "args": {
        "url": "https://example.com",
        "pages": 3,
        "depth": 1
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run SITE_SCRAPE '\\''{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "SITE_SCRAPE",
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "SITE_SCRAPE",
  "arguments": {
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "SITE_SCRAPE",
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "SITE_SCRAPE",
    "args": {
      "url": "https://example.com",
      "pages": 3,
      "depth": 1
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/SITE_SCRAPE?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%2C%22pages%22%3A3%2C%22depth%22%3A1%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/SITE_SCRAPE?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%2C%22pages%22%3A3%2C%22depth%22%3A1%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/SITE_SCRAPE?args=%7B%22url%22%3A%22https%3A%2F%2Fexample.com%22%2C%22pages%22%3A3%2C%22depth%22%3A1%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "SITE_SCRAPE",
    "arguments": "{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"SITE_SCRAPE\",\"args\":{\"url\":\"https://example.com\",\"pages\":3,\"depth\":1}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"SITE_SCRAPE\", \"args\": {\"url\": \"https://example.com\", \"pages\": 3, \"depth\": 1}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### ALFRED (29/30 ways)

List and run the external triggers of your Alfred workflows: any app action or cross-app flow you built in Alfred, callable by a model. Args: op list | run; for run: workflow (bundle id), trigger (trigger id), argument. Runs only workflows on the allowed list (com.cyrus.linesearch, plus the setting alfred-allowed-workflows). Alfred does not return a workflow's output: read what the workflow writes.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ALFRED",
    "args": {
      "op": "list"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ALFRED",
    "args": {
      "op": "list"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/api/run?tool=ALFRED&args=%7B%22op%22%3A%22list%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "ALFRED",
      "arguments": {
        "args": {
          "op": "list"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "ALFRED",
  "arguments": {
    "args": {
      "op": "list"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run ALFRED '{\"op\":\"list\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call ALFRED '{\"op\":\"list\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run ALFRED {\"op\":\"list\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[ALFRED]{\"op\":\"list\"}[/ALFRED]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"ALFRED\",\"args\":{\"op\":\"list\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/hook/hk_runtools/ALFRED",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "op": "list"
  }
}
```

**upstream** (`upstream`)

```json
{
  "available": false,
  "why": "this build has no way of calling this tool by upstream"
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://miscsubjects.com/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"ALFRED\",\"args\":{\"op\":\"list\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"ALFRED\", {\"op\":\"list\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"ALFRED\", {\"op\":\"list\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"ALFRED\",\"arguments\":{\"args\":{\"op\":\"list\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"ALFRED\",\"args\":{\"op\":\"list\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=ALFRED&args=%7B%22op%22%3A%22list%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "ALFRED",
      "args": {
        "op": "list"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run ALFRED '\\''{\"op\":\"list\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "ALFRED",
    "args": {
      "op": "list"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://miscsubjects.com/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "ALFRED",
  "arguments": {
    "args": {
      "op": "list"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "ALFRED",
    "args": {
      "op": "list"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "ALFRED",
    "args": {
      "op": "list"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/ALFRED?args=%7B%22op%22%3A%22list%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/ALFRED?args=%7B%22op%22%3A%22list%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/ALFRED?args=%7B%22op%22%3A%22list%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "ALFRED",
    "arguments": "{\"op\":\"list\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"ALFRED\",\"args\":{\"op\":\"list\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"ALFRED\", \"args\": {\"op\": \"list\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### <KEY> (30/30 ways)

Run an iCloud-synced Shortcut by name on the Mac/iPhone node.
Args: $1 = name, $2 = optional input
Old build: directory row <KEY> (http, local), POST https://agent.miscsubjects.com/apple/shortcut.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "<KEY>",
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "<KEY>",
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run?tool=<KEY>&args=%7B%22name%22%3A%22Door%20Lock%22%2C%22input%22%3A%22%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "<KEY>",
      "arguments": {
        "args": {
          "name": "Door Lock",
          "input": ""
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "<KEY>",
  "arguments": {
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run <KEY> '{\"name\":\"Door Lock\",\"input\":\"\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call <KEY> '{\"name\":\"Door Lock\",\"input\":\"\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run <KEY> {\"name\":\"Door Lock\",\"input\":\"\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[<KEY>]{\"name\":\"Door Lock\",\"input\":\"\"}[/<KEY>]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"<KEY>\",\"args\":{\"name\":\"Door Lock\",\"input\":\"\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/hook/hk_runtools/<KEY>",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "name": "Door Lock",
    "input": ""
  }
}
```

**Upstream (straight to the service)** (`upstream`)

```json
{
  "method": "POST",
  "url": "https://agent.miscsubjects.com/apple/shortcut",
  "headers": {
    "x-terminal-key": "<KEY>",
    "Content-Type": "application/json"
  },
  "body": {
    "name": "Door Lock",
    "input": ""
  }
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://misc-sheets.massoumi-cyrus.workers.dev/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"<KEY>\",\"args\":{\"name\":\"Door Lock\",\"input\":\"\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"<KEY>\", {\"name\":\"Door Lock\",\"input\":\"\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"<KEY>\", {\"name\":\"Door Lock\",\"input\":\"\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"<KEY>\",\"arguments\":{\"args\":{\"name\":\"Door Lock\",\"input\":\"\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"<KEY>\",\"args\":{\"name\":\"Door Lock\",\"input\":\"\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=<KEY>&args=%7B%22name%22%3A%22Door%20Lock%22%2C%22input%22%3A%22%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "<KEY>",
      "args": {
        "name": "Door Lock",
        "input": ""
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run <KEY> '\\''{\"name\":\"Door Lock\",\"input\":\"\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "<KEY>",
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "<KEY>",
  "arguments": {
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "<KEY>",
    "args": {
      "name": "Door Lock",
      "input": ""
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "<KEY>",
    "args": {
      "name": "Door Lock",
      "input": ""
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/<KEY>?args=%7B%22name%22%3A%22Door%20Lock%22%2C%22input%22%3A%22%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/<KEY>?args=%7B%22name%22%3A%22Door%20Lock%22%2C%22input%22%3A%22%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/<KEY>?args=%7B%22name%22%3A%22Door%20Lock%22%2C%22input%22%3A%22%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "<KEY>",
    "arguments": "{\"name\":\"Door Lock\",\"input\":\"\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"<KEY>\",\"args\":{\"name\":\"Door Lock\",\"input\":\"\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"<KEY>\", \"args\": {\"name\": \"Door Lock\", \"input\": \"\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

### APPLE_JXA (30/30 ways)

Run JavaScript for Automation (JXA) on the Mac.
Args: $1 = JavaScript source
Old build: directory row APPLE_JXA (http, local), POST https://agent.miscsubjects.com/apple/jxa.

**REST (curl)** (`curl`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "APPLE_JXA",
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**REST, named arguments (curl)** (`named`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "APPLE_JXA",
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**Link (one URL)** (`url`)

```json
{
  "method": "GET",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run?tool=APPLE_JXA&args=%7B%22code%22%3A%22Application(%5C%22System%20Events%5C%22).unixId()%22%7D",
  "headers": {}
}
```

**MCP over HTTP (JSON-RPC)** (`jsonrpc`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "authorization": "Bearer <KEY>",
    "accept": "application/json, text/event-stream",
    "content-type": "application/json"
  },
  "body": {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "APPLE_JXA",
      "arguments": {
        "args": {
          "code": "Application(\"System Events\").unixId()"
        }
      }
    }
  }
}
```

**MCP client (Claude Code)** (`claude_code`)

```json
{
  "method": "MCP",
  "server": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "APPLE_JXA",
  "arguments": {
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**misc CLI** (`misc`)

```json
{
  "method": "CLI",
  "command": "misc run APPLE_JXA '{\"code\":\"Application(\\\"System Events\\\").unixId()\"}'"
}
```

**console-app CLI** (`console_app`)

```json
{
  "method": "CLI",
  "command": "console-app call APPLE_JXA '{\"code\":\"Application(\\\"System Events\\\").unixId()\"}'"
}
```

**One line of text** (`line`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/line",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "line": "run APPLE_JXA {\"code\":\"Application(\\\"System Events\\\").unixId()\"}"
  }
}
```

**Tag ([KEY][/KEY])** (`tag`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/tag",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "text": "[APPLE_JXA]{\"code\":\"Application(\\\"System Events\\\").unixId()\"}[/APPLE_JXA]"
  }
}
```

**Apple Shortcut** (`shortcut`)

```json
{
  "method": "CLI",
  "command": "printf '%s' '{\"tool\":\"APPLE_JXA\",\"args\":{\"code\":\"Application(\\\"System Events\\\").unixId()\"}}' > /private/tmp/misc-sheets-shortcut-input.json && shortcuts run 'misc-sheets run' -i /private/tmp/misc-sheets-shortcut-input.json -o /private/tmp/misc-sheets-shortcut-output.txt; cat /private/tmp/misc-sheets-shortcut-output.txt"
}
```

**Webhook** (`webhook`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/hook/hk_runtools/APPLE_JXA",
  "headers": {
    "content-type": "application/json"
  },
  "body": {
    "code": "Application(\"System Events\").unixId()"
  }
}
```

**Upstream (straight to the service)** (`upstream`)

```json
{
  "method": "POST",
  "url": "https://agent.miscsubjects.com/apple/jxa",
  "headers": {
    "x-terminal-key": "<KEY>",
    "Content-Type": "application/json"
  },
  "body": {
    "code": "Application(\"System Events\").unixId()"
  }
}
```

**Command line (Mac)** (`shell`)

```json
{
  "method": "CLI",
  "command": "curl -sS -X POST 'https://misc-sheets.massoumi-cyrus.workers.dev/api/run' -H 'x-sheets-key: <KEY>' -H 'content-type: application/json' --data '{\"tool\":\"APPLE_JXA\",\"args\":{\"code\":\"Application(\\\"System Events\\\").unixId()\"}}'"
}
```

**SDK method (client library)** (`sdk`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { MiscSheets } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconst misc = new MiscSheets(\"<KEY>\");\nconsole.log(JSON.stringify(await misc.run(\"APPLE_JXA\", {\"code\":\"Application(\\\"System Events\\\").unixId()\"})));"
}
```

**Direct function call** (`function_direct`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "import { run } from 'file:///Users/cyrusmassoumi/misc-sheets/sdk.mjs';\nconsole.log(JSON.stringify(await run(\"APPLE_JXA\", {\"code\":\"Application(\\\"System Events\\\").unixId()\"}, \"<KEY>\")));"
}
```

**MCP over stdio** (`mcp_stdio`)

```json
{
  "method": "CLI",
  "command": "printf '%s\\n%s\\n%s\\n' '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"cli\",\"version\":\"1.0.0\"}}}' '{\"jsonrpc\":\"2.0\",\"method\":\"notifications/initialized\"}' '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"APPLE_JXA\",\"arguments\":{\"args\":{\"code\":\"Application(\\\"System Events\\\").unixId()\"}}}}' | MISC_KEY='<KEY>' node /Users/cyrusmassoumi/misc-sheets/mcp-stdio.mjs"
}
```

**WebSocket** (`websocket`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const ws = new WebSocket(\"wss://miscsubjects.com/api/run/ws\");\nws.addEventListener('open', () => ws.send(JSON.stringify({\"tool\":\"APPLE_JXA\",\"args\":{\"code\":\"Application(\\\"System Events\\\").unixId()\"}})));\nws.addEventListener('message', (e) => { console.log(typeof e.data === 'string' ? e.data : String(e.data)); ws.close(); process.exit(0); });\nsetTimeout(() => { console.log('ws timeout'); process.exit(1); }, 10000);"
}
```

**Server-sent events** (`sse`)

```json
{
  "method": "CLI",
  "command": "curl -sSN -H 'x-sheets-key: <KEY>' 'https://miscsubjects.com/api/run/sse?tool=APPLE_JXA&args=%7B%22code%22%3A%22Application(%5C%22System%20Events%5C%22).unixId()%22%7D' --max-time 30"
}
```

**GraphQL** (`graphql`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/graphql",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "query": "query($tool:String!,$args:JSON){ run(tool:$tool, args:$args) }",
    "variables": {
      "tool": "APPLE_JXA",
      "args": {
        "code": "Application(\"System Events\").unixId()"
      }
    }
  }
}
```

**SSH / remote exec** (`ssh`)

```json
{
  "method": "CLI",
  "command": "ssh -o BatchMode=yes -o ConnectTimeout=5 localhost 'cd /Users/cyrusmassoumi/misc-sheets && misc run APPLE_JXA '\\''{\"code\":\"Application(\\\"System Events\\\").unixId()\"}'\\'''"
}
```

**This build: REST (/api/run)** (`run`)

```json
{
  "method": "POST",
  "url": "https://misc-sheets.massoumi-cyrus.workers.dev/api/run",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "tool": "APPLE_JXA",
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**This build’s MCP server (/mcp)** (`mcp`)

```json
{
  "method": "MCP",
  "server": "https://misc-sheets.massoumi-cyrus.workers.dev/mcp",
  "headers": {
    "Authorization": "Bearer <KEY>"
  },
  "tool": "APPLE_JXA",
  "arguments": {
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**OIP (POST /api/dispatch, this build’s door)** (`oip`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "APPLE_JXA",
    "args": {
      "code": "Application(\"System Events\").unixId()"
    }
  }
}
```

**OIP dry run (the call written out, never sent)** (`oip_shape`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/dispatch",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "key": "APPLE_JXA",
    "args": {
      "code": "Application(\"System Events\").unixId()"
    },
    "shape": true
  }
}
```

**Link with a token (this tool only, no key)** (`token`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/g/run/APPLE_JXA?args=%7B%22code%22%3A%22Application(%5C%22System%20Events%5C%22).unixId()%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Web GET for a browser model (/web/run)** (`web_get`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/web/run/APPLE_JXA?args=%7B%22code%22%3A%22Application(%5C%22System%20Events%5C%22).unixId()%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**The tool’s own address (/s/TOOL, with a token)** (`slug`)

```json
{
  "method": "GET",
  "url": "https://miscsubjects.com/s/APPLE_JXA?args=%7B%22code%22%3A%22Application(%5C%22System%20Events%5C%22).unixId()%22%7D&token=<SCOPED_TOKEN>",
  "headers": {}
}
```

**Function call (a model’s tool call, as it wrote it)** (`function_call`)

```json
{
  "method": "POST",
  "url": "https://miscsubjects.com/api/tools/call",
  "headers": {
    "x-sheets-key": "<KEY>",
    "content-type": "application/json"
  },
  "body": {
    "name": "APPLE_JXA",
    "arguments": "{\"code\":\"Application(\\\"System Events\\\").unixId()\"}"
  }
}
```

**JavaScript (fetch)** (`js`)

```json
{
  "method": "CODE",
  "language": "javascript",
  "code": "const r = await fetch(\"https://miscsubjects.com/api/run\", {\n  method: 'POST',\n  headers: {\"x-sheets-key\":\"<KEY>\",\"content-type\":\"application/json\"},\n  body: JSON.stringify({\"tool\":\"APPLE_JXA\",\"args\":{\"code\":\"Application(\\\"System Events\\\").unixId()\"}}),\n});\nconsole.log(r.status, await r.text());"
}
```

**Python (requests)** (`python`)

```json
{
  "method": "CODE",
  "language": "python",
  "code": "import requests\nr = requests.post(\"https://miscsubjects.com/api/run\", headers={\"x-sheets-key\": \"<KEY>\", \"content-type\": \"application/json\"}, json={\"tool\": \"APPLE_JXA\", \"args\": {\"code\": \"Application(\\\"System Events\\\").unixId()\"}}, timeout=300)\nprint(r.status_code, r.text)"
}
```

---

**above:** [[atomic-tooling]]

**adjacent:** [[directory-ledger-pattern]]
