{"slug":"directory-row-contract","title":"One row of SQL is the whole contract for a capability, and the 892nd took 3.1 seconds","body":"A capability on this build is one row in a SQLite table on Cloudflare D1 called `directory`. The row is the whole contract: what the capability is, how to call it, what comes back, which credential it needs, and who is allowed to run it. There is no companion file, no registration call in application code, and no deploy step. On 2026-07-26 the table held 891 rows.\n\n**Scope note:** this article covers the `directory` table's row shape only — the contract for API calls, shell commands, agents and other executable capabilities. It is one of at least two object families on this build; content (articles, their claims, their revisions) lives in a separate `articles`/`article_slots` pair of tables with its own resolver, not in `directory`. [892 rows, 8 of them MCP](/a/the-directory-is-not-the-object-system) draws that line explicitly.\n\nEvery field below is published rather than paraphrased, every runner type has a real row printed as stored, and the failure strings are copied out of the code that emits them. The volume argument — why holding 891 tool definitions in a model's context is the wrong shape — is [tooling as data](/a/tooling-as-data). The call sequence around a row is [the four-step loop](/a/dispatch-four-step-loop). The Model Context Protocol view of the same rows is [MCP as a projection](/a/mcp-as-a-projection).\n\n## Evidence status\n\n**Observed** marks first-party measurements or runtime receipts from the named environment.\n**Derived** marks arithmetic calculated from cited inputs. **Specified** marks vendor or standards\ndocumentation. **Implemented** and **deployed** name code and live-state evidence, respectively.\n**Reproduced** means the stated procedure was rerun. **Externally attested** marks operator reports;\nthose reports show that an experience occurred, not that it is universal.\n\n## Eighteen columns, of which six existed on the first day\n\nThe table as it stands in production. Read it back yourself:\n\n```bash\ncd /Users/cyrusmassoumi/miscsubjects-pages\nnpx wrangler d1 execute loop-content-spine --remote \\\n  --command \"SELECT sql FROM sqlite_master WHERE name='directory';\"\n```\n\n```sql\nCREATE TABLE directory (\n  key        TEXT PRIMARY KEY,\n  type       TEXT NOT NULL CHECK (type IN ('fn','http','agent','flow')),\n  target     TEXT,\n  auth       TEXT,\n  content    TEXT,\n  updated_at TEXT NOT NULL\n, category TEXT, allowed_categories TEXT, seq INTEGER, enabled INTEGER DEFAULT 1,\n  planner_visible INTEGER DEFAULT 1, planner_rank INTEGER DEFAULT 100,\n  input_schema TEXT, examples TEXT, sensitive INTEGER DEFAULT 0, runner TEXT,\n  includes TEXT, created_at TEXT)\n```\n\nThe first six columns came from `migrations/0007_directory.sql:1-8`. Everything after the closing parenthesis of the original statement is an `ALTER TABLE` bolted on later, which is why the SQL reads the way it does.\n\n| Column | Type · default | Required | What it holds | Real value |\n| --- | --- | --- | --- | --- |\n| `key` | TEXT, primary key | yes | The invocation name. Unique by constraint, uppercase by convention. | `GROK_MODELS` |\n| `type` | TEXT, `CHECK IN ('fn','http','agent','flow')` | yes | Decides how `target` and `content` are read. The only constrained column in the table. | `http` |\n| `target` | TEXT | by type | `fn`: a function name. `http`: `\"METHOD url\"`. `agent`: a model id. `flow`: empty. | `GET https://api.x.ai/v1/models` |\n| `auth` | TEXT | no | The *name* of an environment variable and how to apply it. Never a secret value. | `bearer:GROK_API_KEY` |\n| `content` | TEXT | yes, gated | `fn`/`http`: comment docstring plus the argument template. `agent`: the system prompt. `flow`: the step DSL. | see the four rows below |\n| `updated_at` | TEXT, NOT NULL | yes | ISO timestamp of the last write. The only change marker on the row. | `2026-06-10 02:22:52` |\n| `category` | TEXT | no | Grouping label. 110 distinct values live. | `grok` |\n| `allowed_categories` | TEXT | no | On `agent` rows: the categories that agent's tool listing is restricted to, or `*`. | `*` |\n| `seq` | INTEGER | no | Manual ordinal used to pin a row to a position. Null for almost every row. | `null` |\n| `enabled` | INTEGER, default 1 | no | `0` hides the row from every projection. 13 rows are disabled. | `1` |\n| `planner_visible` | INTEGER, default 1 | no | Whether planners and the MCP projection list it. | `1` |\n| `planner_rank` | INTEGER, default 100 | no | Sort weight for candidate selection. Lower wins. | `100` |\n| `input_schema` | TEXT | no | JSON Schema string, used when the row is projected as a typed tool. 256 rows carry one. | `null` |\n| `examples` | TEXT | no | JSON array of worked argument strings. 63 rows carry one. | `[\"37.77\\|-122.42\"]` |\n| `sensitive` | INTEGER, default 0 | no | `1` routes the call through the watcher before it runs. 227 rows are marked. | `0` |\n| `runner` | TEXT | no | Overrides the runner inferred from `type`. 301 rows have a value. | `null` |\n| `includes` | TEXT | no | On `agent` rows: comma-separated prompt-block keys composed in front of `content` at runtime. | `BLOCK_VOICE,BLOCK_REASONING_A` |\n| `created_at` | TEXT | no | Present in the live table. **No migration in the repo adds it.** | `null` on old rows |\n| `row_num` | computed, not stored | — | 1-based position in the canonical ordering, attached by the read path. | `412` |\n\nColumn provenance, by migration: `0012_directory_category.sql:7-9` added `category`, `allowed_categories`, `seq`. `0018_planner_columns.sql:5-9` added the five planning and schema columns. `0064_substrate.sql:5` added `runner`. `0118_add_directory_sensitive.sql:2` added `sensitive`. `0183_prompt_blocks.sql:2` added `includes`. `created_at` has no such line — `grep -rn \"ALTER TABLE directory\" --include=\"*.sql\" .` returns fourteen matches and none of them mention it, so that column entered the production table out of band. A rebuild should add it in a migration.\n\nTwo columns exist in the table but cannot be written through the REST surface. The PATCH handler's field allow-list at `functions/api/directory/[key].js:223` contains thirteen names, and neither `sensitive` nor `runner` is one of them:\n\n```bash\ncurl -sS -X PATCH \"https://miscsubjects.com/api/directory/ZZ_TEST_TEMPERATURE\" \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' \\\n  -d '{\"runner\":\"edge\"}'\n# {\"error\":\"no recognized fields\"}   HTTP 400\n```\n\n## The type column decides everything else, and it has exactly four legal values\n\n`fn` runs a function inside the build's own Worker. `http` calls somebody else's API. `agent` sends `content` to a model as a system prompt. `flow` chains other rows. The dispatcher branches on the column at `functions/api/dispatch.js:1145-1156`; a fifth value is rejected by the `CHECK` constraint before that branch is reached.\n\n| Type | Live rows | `target` holds | `content` holds | Pick it when |\n| --- | --- | --- | --- | --- |\n| `fn` | 480 | a key into the runner map | a JSON array template of the function's positional arguments | the work is code you control and want to run at the edge |\n| `http` | 303 | `\"METHOD url\"`, with `$1` slots | the request body template, or nothing for GET | the work is an existing API |\n| `agent` | 57 | a model id, e.g. `grok-4.3` or `gw:openai/gpt-4.1-mini` | the system prompt | the work needs judgement, not a deterministic call |\n| `flow` | 51 | empty string | steps separated by `>`, each `KEY: args` | the work is two or more capabilities in order |\n\nCounted live:\n\n```bash\nnpx wrangler d1 execute loop-content-spine --remote \\\n  --command \"SELECT type, COUNT(*) AS n FROM directory GROUP BY type ORDER BY n DESC;\"\n# fn 480 | http 303 | agent 57 | flow 51   → 891\n```\n\nOne real row of each type, exactly as stored.\n\n**`fn` — `NOW`**\n\n```\nkey  NOW | type fn | target now | auth (null) | category time\ncontent   # Return the current time from the build clock in Pacific time (America/Los_Angeles).\n          # WHEN_TO_USE: any object or model that needs the current date or time.\n          # ARGS: none\n          # EX: [NOW][/NOW]\n          # OUTPUT: { now, today, time, zone, iso } — Pacific-offset ISO; today is the Pacific calendar date.\n```\n\nEvery line of `content` beginning with `#` is stripped before execution by `stripDocs` at `dispatch.js:440-452`. What is left is the executable payload. `NOW` has no payload line, so `runFn` falls back to the default template `[\"$1\"]` at `dispatch.js:1170`.\n\n**`http` — `GROK_MODELS`**\n\n```\nkey  GROK_MODELS | type http | category grok | auth bearer:GROK_API_KEY\ntarget    GET https://api.x.ai/v1/models\ncontent   # WHAT: List every model on the xAI API. No args\n          # WHEN_TO_USE: you need to grok models\n          # ARGS: see content\n          # EX: [GROK_MODELS][/GROK_MODELS]\n          # List every model on the xAI API. No args.\n```\n\n**`agent` — `PROMPT_LAB_AGENT`**\n\n```\nkey  PROMPT_LAB_AGENT | type agent | target grok-4.3 | auth bearer:GROK_API_KEY\ncontent   You are a friendly peptide concierge (LAB TEST v1). One warm sentence,\n          then end with [REPLY]your text[/REPLY].\n```\n\nAn `agent` row with `includes` composes shared prompt blocks in front of `content` at runtime: `ROUTER` carries `BLOCK_VOICE,BLOCK_IMESSAGE,BLOCK_EMOJI,BLOCK_ROUTING,BLOCK_ARA`, so the voice rules are written once and referenced by six rows.\n\n**`flow` — `BLOOIO_FINISH`**\n\n```\nkey  BLOOIO_FINISH | type flow | target (empty)\ncontent   # Phase C of the inbound turn: given the full agent output text in $1, extract the\n          #   LAST [REPLY], send via blooio to $2, return the send result.\n          # $1=agent output text. $2=recipient phone.\n          LAST_REPLY_OF: $1\n          > SEND_BY_CHANNEL: blooio|$2|$PREV\n```\n\nThe flow reader splits on a top-level `>` and runs each step against the previous step's output, bound to `$PREV` (`dispatch.js:1686-1731`). A step is `KEY: body`. Appending `=> NAME` binds that step's output to `$NAME` for later steps. A `{ A: x | B: y }` block fans out concurrently. A step whose output starts with `ERR:` stops the flow.\n\n## Arguments are one string, split on the pipe character, and that is a deliberate trade\n\nThe invocation body is a single string. The dispatcher splits it on `|` and hands the pieces to the runner as `args`:\n\n```js\nconst args = String(body == null ? '' : body).split('|');\n```\n\nThat is `dispatch.js:1144`. In a template, `$1` is the first piece, `$2` the second. Two arguments:\n\n```bash\ncurl -sS -X POST https://miscsubjects.com/api/dispatch \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' \\\n  -d '{\"key\":\"ZZ_TEST_TEMPERATURE\",\"body\":\"37.77|-122.42\"}'\n```\n\n`$1` becomes `37.77`, `$2` becomes `-122.42`, and the target `GET https://api.open-meteo.com/v1/forecast?latitude=$1&longitude=$2&current=temperature_2m` resolves to a real URL.\n\nThe obvious break: a pipe inside an argument. A JSON body, a prompt, a shell command, a sentence with a pipe in it — the naive split shreds all of them. The handled form is `$N+`, which rejoins arguments N through the end with the pipe put back:\n\n```js\nif (/^\\d+\\+$/.test(key)) {\n  const v = args.slice(+key.slice(0, -1) - 1).join('|');\n  return raw ? v : escFor(mode, v);\n}\n```\n\n`dispatch.js:171-175`. So a row that takes a JSON blob as its last argument uses `$2+`, not `$2`. `DIR_PATCH` is the live example — it edits another row, so its second argument is arbitrary JSON:\n\n```\nkey      DIR_PATCH\ntype     http\ntarget   PATCH https://miscsubjects.com/api/directory/$1\ncontent  # ARGS: key | json_body\n         # EX: [DIR_PATCH]ROUTER|{\"content\":\"new prompt text\"}[/DIR_PATCH]\n         $2+\n```\n\nCalled as `body: 'ROUTER|{\"content\":\"a|b\"}'`, the key is `ROUTER` and the body template `$2+` receives `{\"content\":\"a|b\"}` intact. The rule that follows: **only the last argument of a row may contain a pipe, and only if the template uses `$N+`.** A row with two free-text arguments in the middle of its signature is unrepresentable, and that is the real cost of the format.\n\nSubstitution is escape-aware. `subVars` at `dispatch.js:156-201` takes a mode — `url`, `json-string` or `raw` — and escapes each value for the position it lands in, so a quote inside an argument cannot break out of a JSON body template. `$$KEY` skips the escaping. `$PREV` is the previous flow step's output. An unresolved `$NAME` is left in place as literal text rather than becoming an empty string.\n\nWhy one flat string and not a JSON object per capability: a caller that has read one contract can call any of the 891 without learning a new argument shape, and a router can forward a user's sentence through unchanged. The price is no types at the door. That is the trade one commenter refuses — menix, arguing schemas let a code-writing agent plan one precise program instead of a print-and-inspect loop. Both positions describe real failure modes; the comparison table below lands the verdict.\n\n## The row names the environment variable; the value never enters the table\n\nThe `auth` column is a prefix and an environment-variable name. `applyAuth` at `dispatch.js:203-234` reads it at call time:\n\n| Form | What happens | Live rows |\n| --- | --- | --- |\n| empty or null | no credential applied | 637 |\n| `headers:{\"k\":\"$ENV_NAME\"}` | each header value has `$NAME` replaced from the environment | 139 |\n| `bearer:ENV_NAME` | `Authorization: Bearer <value of ENV_NAME>` | 68 |\n| `basic:ENV_NAME` | `Authorization: Basic ` + base64 of `<value>:` | 45 |\n| `query:param=ENV_NAME` | appends `?param=<url-encoded value>` to the URL | 2 |\n| anything else | throws `ERR:auth:unknown_prefix:<prefix>` | 0 |\n\n```bash\nnpx wrangler d1 execute loop-content-spine --remote --command \\\n\"SELECT CASE WHEN auth IS NULL OR TRIM(auth)='' THEN '(none)'\n        ELSE substr(auth,1,instr(auth,':')) END AS form, COUNT(*) AS n\n FROM directory GROUP BY form ORDER BY n DESC;\"\n```\n\n115 rows name a credential through `bearer:`, `basic:` or `query:`, and between them they reference **12 distinct auth specifications**. `bearer:GROK_API_KEY` alone appears on 35 rows. One rotation in the platform secret store changes the credential for all 35; no row is touched, no migration runs, no deploy happens.\n\nAn attacker who exfiltrates the whole table learns every capability that exists, every upstream URL, every argument shape, which capabilities are credentialed, and the *names* of the twelve secrets. That is a real map, worth defending. What they do not get is one credential value, because no column ever holds one. The failure mode of a leaked registry that stores values is total; here it is reconnaissance.\n\nThe row's claims about permission are advisory. Enforcement is server-side and independent of the row. When an invocation arrives with a scoped capability token, `capGateCheck` at `dispatch.js:2121-2149` evaluates revocation, audience binding, owner gate, contract hash, risk ceiling, fixed body and payload ceiling before any runner is reached. A row marked `sensitive = 1` is denied to any token whose `risk_ceiling` is not `high`, with the literal reason `risk_ceiling:low<row:high`. Editing the row cannot widen a token; editing a token cannot reach a row outside its scope. That is the pattern jensbontinck described from production — the credential sits at the enforcement point, not with the caller.\n\nShape mode proves the boundary without firing anything: `{\"key\":\"…\",\"body\":\"…\",\"shape\":true}` returns the fully constructed outbound request with credential material stripped by `redactDeep` (`dispatch.js:1338-1356`), which removes `authorization`, `x-api-key`, `cookie` and any `*_API_KEY`-shaped string. Against a row whose `auth` named a variable absent from the environment, the preview came back `\"headers\":{}` — no credential, no header, and the upstream 401 is the first signal.\n\n## Reading one row returns a document that assumes the reader knows nothing\n\n```bash\ncurl -s \"https://miscsubjects.com/api/dispatch?key=GROK_MODELS&format=markdown\"\n```\n\n4,413 bytes. The blocks it contains, and why each is there:\n\n| Block | Content | Why it exists |\n| --- | --- | --- |\n| Path | `OIP > GROK > GROK_MODELS` | places the row in the tree so a reader can climb to siblings |\n| Capability / When to use | the `# WHAT` and `# WHEN_TO_USE` lines from `content` | the two questions a caller has before choosing |\n| RUN NOW | a single URL that fires the example | a model with only a URL-fetch tool can still invoke it |\n| Example call | `[GROK_MODELS][/GROK_MODELS]` | the router tag form, for a model emitting tags in prose |\n| type · runner · auth · risk | `tool · edge · grok`, `required · low` | tells the caller whether a credential and an approval are needed before trying |\n| inputs / outputs | `{\"args\":\"see content\"}` and the documented return shape | the argument contract |\n| Affordances | the moves the presented credential can make | computed for the caller, with the note that the server enforces scope regardless |\n| Machine Contract | four imperatives, including \"do not infer the row shape from memory\" | stops a model reconstructing a stale signature from training data |\n| Invocation / Ledger / Repair | ledger, receipt, replay and repair URLs | closes the loop after the call |\n| Troubleshooting | four problems, each with an action and a URL | the same content as the failure table below, at the point of use |\n\nThe contract is close to constant in size regardless of the row. Measured across four rows of four different types: `NOW` 4,423 bytes, `GROK_MODELS` 4,413, `ROUTER` 4,442, `CONTENT_SEARCH` 4,507. The per-row variance is under 100 bytes because the scaffolding dominates and the row-specific part is small — that is the shape of a contract that is fetched one at a time rather than held in context. Fetching all of them at once is the opposite bargain: `curl -s \"https://miscsubjects.com/api/dispatch?registry=1\" | wc -c` returns 1,608,554 bytes for 877 objects.\n\nPeople running large tool surfaces keep measuring the same thing independently: a maintainer auditing his own agent found 47 tool schemas costing 13,341 tokens on every request before the user's message; a vendor engineer building an MCP server for a large unified API hit 50,000 tokens of definitions before the agent touched a single user message; a tiktoken run against one server's full tool list produced 741 tools and roughly 488,013 tokens, larger than the context window it was meant to fit.\n\n## Adding the 892nd capability: one POST, then a receipt proving it ran\n\nEverything below was executed against production on 2026-07-26 using an obviously-named throwaway row, `ZZ_TEST_TEMPERATURE`, which was deleted at the end. The outputs are copied verbatim.\n\n**Step 1 — the credential.** `TERMINAL_KEY` is the owner key checked by `isBuildAuthed`. Every mutating call carries it as `x-terminal-key`.\n\n```bash\nexport TERMINAL_KEY=\"$(grep '^TERMINAL_KEY=' ~/.config/grok-bridge.env | cut -d= -f2 | tr -d '\"')\"\n```\n\n**Step 2 — the POST.** `key` and `type` are the only required fields (`functions/api/directory/index.js:51`).\n\n```bash\ncurl -sS -X POST https://miscsubjects.com/api/directory \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\n    \"key\": \"ZZ_TEST_TEMPERATURE\",\n    \"type\": \"http\",\n    \"target\": \"GET https://api.open-meteo.com/v1/forecast?latitude=$1&longitude=$2&current=temperature_2m\",\n    \"auth\": \"\",\n    \"content\": \"# WHAT: Current temperature in Celsius for one latitude and longitude, from the Open-Meteo public API.\\n# WHEN_TO_USE: a capability needs the live temperature at a coordinate.\\n# ARGS: $1=latitude | $2=longitude\\n# EX: [ZZ_TEST_TEMPERATURE]37.77|-122.42[/ZZ_TEST_TEMPERATURE]\\n# OUTPUT: JSON with current.temperature_2m\",\n    \"category\": \"tools\",\n    \"enabled\": 1,\n    \"planner_visible\": 1,\n    \"examples\": \"[\\\"37.77|-122.42\\\"]\"\n  }'\n```\n\n```json\n{\"ok\":true,\"key\":\"ZZ_TEST_TEMPERATURE\",\"updated_at\":\"2026-07-26T04:36:19.832Z\"}\n```\n\nHTTP 201. Without the header the same call returns `{\"error\":\"unauthorized\"}` and HTTP 401.\n\n**Step 3 — invoke it.** No deploy, no restart, no cache warm-up in between.\n\n```bash\ncurl -sS -X POST https://miscsubjects.com/api/dispatch \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' \\\n  -d '{\"key\":\"ZZ_TEST_TEMPERATURE\",\"body\":\"37.77|-122.42\"}' \\\n  -w \"\\nhttp=%{http_code} total=%{time_total}s\\n\"\n```\n\n```json\n{\"ok\": true, \"ran\": true, \"trace\": \"t_jweoafmw\",\n \"result\": \"HTTP 200:{\\\"latitude\\\":37.763283,\\\"longitude\\\":-122.41286,...,\\\"current\\\":{\\\"time\\\":\\\"2026-07-26T04:30\\\",\\\"interval\\\":900,\\\"temperature_2m\\\":15.7}}\",\n \"proof\": {\"ok\": true, \"invocation_id\": \"inv_c23irnzhx1\",\n           \"public_receipt\": \"https://miscsubjects.com/receipt/inv_c23irnzhx1\"}}\n```\n\n`http=200 total=3.126264s` — 3.13 seconds wall clock from a laptop in California, including the Open-Meteo round trip. Three consecutive invocations of a pure `fn` row with no upstream call, timed the same way, took 3.40 s, 1.07 s and 1.59 s; the first carries TLS and connection setup.\n\n**Step 4 — the receipt.** `inv_c23irnzhx1` records actor `owner:terminal-key`, runner `http`, trace `t_jweoafmw`, `material: true`, `cost_usd: 0`, and three SHA-256 fingerprints: input, output, and the object contract. It is public and keyless:\n\n```bash\ncurl -s \"https://miscsubjects.com/api/dispatch?confirm=inv_c23irnzhx1\"\n# \"confirmed\": true, \"status\": \"PROVEN_MATERIAL_RESULT\"\n```\n\n**Step 5 — remove it.**\n\n```bash\ncurl -sS -X DELETE \"https://miscsubjects.com/api/directory/ZZ_TEST_TEMPERATURE\" \\\n  -H \"x-terminal-key: $TERMINAL_KEY\"\n# {\"ok\":true,\"key\":\"ZZ_TEST_TEMPERATURE\",\"deleted\":1}\n```\n\nA subsequent `GET /api/directory/ZZ_TEST_TEMPERATURE` returns 404. The receipt still resolves and still reports `confirmed: true` — deleting the definition does not delete the history of what it did.\n\n## The no-restart property depends on something outside the row\n\nNothing here caches a tool list on the caller's side, so a new row is live on the next read. That is not a general property of tool registries, and the people who run them keep filing the same bug.\n\nA registry gateway maintainer describes the failure exactly: upstream tool lists cached at registration time, stale until a manual re-registration or a full restart, with removed tools leaving dangling references inside tool groups. The Model Context Protocol has a message for this — a server that declared the `listChanged` capability SHOULD send `notifications/tools/list_changed` when its tool list changes. Two independent reports say clients ignore it. One user reproduced a dynamic-registration server against an IDE that never re-queries `tools/list`, while the same server worked in two other clients. A Microsoft engineer filed identical behaviour against a CLI client, with a repro video, noting the same product's editor extension updates immediately.\n\n\"Add a capability without a restart\" is therefore a claim about the whole path, not about the registry. This path has no client-side cache to invalidate because the caller fetches one contract at a time. A registry that pushes definitions into a client's context inherits that client's refresh behaviour, and the behaviour is not uniform.\n\n## Every failure names itself, and the names are in the code\n\n| Symptom | Literal response | Cause | Fix |\n| --- | --- | --- | --- |\n| Call returns immediately, nothing ran | `{\"error\":\"unknown_key\",\"attempted\":\"ZZ_TEST_TEMPERATUR\",\"ran\":false,\"did_you_mean\":[…]}` | key not in the table | use a `did_you_mean` entry, or `GET /api/dispatch?ask=<plain words>` |\n| `fn` row fails before running | `ERR:fn:unknown_target:<name>` | `target` names a function absent from the runner map (`dispatch.js:1169`) | correct `target`, or the function was renamed in a deploy |\n| `fn` row fails on its own template | `ERR:fn:bad_content_json:<parser message>` | the executable line of `content` is not valid JSON after substitution (`dispatch.js:1173`) | the template must be a JSON array; check for an unescaped quote in an argument |\n| `fn` template parses but is rejected | `ERR:fn:content_not_array` | the template is valid JSON but not an array (`dispatch.js:1174`) | wrap it: `[\"$1\",\"$2\"]` |\n| Credential-shaped `auth` never applies | request goes out with `\"headers\":{}` | `auth` names an environment variable that does not exist | add the secret under the exact name; the row does not change |\n| Auth string is malformed | `ERR:http:<KEY>:ERR:auth:unknown_prefix:apikey` | prefix is not one of `bearer:`, `basic:`, `headers:`, `query:`, `oauth:` (`dispatch.js:234`) | use a supported prefix |\n| Upstream refuses | `ERR:http:401:<body>` | the credential exists but is rejected | rotate the secret; the row is fine |\n| Every call to one row fails instantly after a run of 401s | `ERR:breaker_open:<KEY> — 8 consecutive auth failures; credential is dead until replaced.` | the circuit breaker tripped at 8 consecutive 401/403 (`dispatch.js:1293-1320`) | replace the credential; the breaker clears after 1 hour or on `KV delete breaker:<KEY>` |\n| Target host unreachable | `ERR:http:fetch:<message>` | DNS, TLS or connection failure (`dispatch.js:1285`) | check the URL in `target` |\n| Argument missing | URL renders with an empty slot, e.g. `&longitude=&` | fewer pipe-separated pieces than the template's `$N` slots | count the `$N` slots; extra arguments beyond the highest slot are silently discarded |\n| `flow` step fails | `ERR:flow:bad_step:<text>` | a step has no `:` separating key from body (`dispatch.js:1723`) | write `KEY: args` |\n| Write refused, nothing changed | `{\"error\":\"registry_hygiene_refused: missing_description\",\"how_to_fix\":\"content (the docstring…) is required…\",\"state_changed\":false}` | PUT/PATCH would leave the row with empty `content` (`[key].js:142-153`) | write the `# WHAT / # ARGS / # EX` docstring |\n| Marking a row sensitive is refused | `{\"error\":\"registry_hygiene_refused: high_risk_missing_schema\"}` | `sensitive` set without `input_schema` | supply `input_schema` in the same call |\n| PATCH accepted no changes | `{\"error\":\"no recognized fields\"}` HTTP 400 | the body named only fields outside the allow-list (`[key].js:223`) | `sensitive` and `runner` are not writable through PATCH |\n| Token rejected on a row it should reach | `risk_ceiling:low<row:high` | the row is `sensitive` and the token's ceiling is not `high` | mint a token with the higher ceiling; the row is not the problem |\n| Token rejected after an unrelated edit | `contract_changed:<pinned>!=<current>` | the token pinned a contract hash and the row's contract changed | mint a fresh token against the new contract |\n\nThe hygiene gate is asymmetric on purpose. `PUT` refuses any non-compliant write. `PATCH` compares the violation before and after the merge and refuses only a patch that makes a compliant row non-compliant, so the rows that predate the rule stay editable for unrelated maintenance (`[key].js:206-219`). Of 891 rows, 256 carry an `input_schema` and 63 carry `examples`.\n\n## Where the row loses to a schema, and where a schema loses to the row\n\n| Dimension | Directory row | JSON Schema tool definition | OpenAPI 3.1 operation | MCP tool |\n| --- | --- | --- | --- | --- |\n| Argument typing before the call | none; one string, split on `\\|` | full — types, enums, required, formats | full, plus content negotiation and parameter locations | full; `inputSchema` is a JSON Schema object |\n| Rejects a bad call without executing | no; the runner or the upstream rejects it | yes, at the validator | yes, at the gateway or generated client | yes, if the host validates |\n| Client code generation | none | partial | mature; the spec exists so consumers can act \"without access to source code\" | via generated SDKs over the schema |\n| Ecosystem and tooling | one implementation, this one | universal | very large | growing fast, multi-vendor |\n| Discovery | `?ask=` in plain words, or `?registry=1` | out of band | the document is the discovery surface | `tools/list` |\n| Cost in caller context | one contract, ~4.4 KB, fetched when needed | every definition, every request | n/a in-prompt; large as a document | every definition, every request unless the host defers |\n| Adding a capability | one INSERT, live immediately | edit the tool array, redeploy the caller | edit the document, regenerate clients | server-side change plus a `list_changed` the client may ignore |\n| Change safety for callers | contract hash on the receipt, detected after the fact | schema diff, detected by tooling | versioned document, diffable | schema diff, if the client re-reads |\n\nThe verdict. Use a schema when a wrong call is expensive and must be stopped before it executes — money movement, destructive writes, anything where \"the upstream returned 400\" is already too late — or when strangers will write clients against it. Typing is not decoration there; it is the only place a bad argument is caught for free. Use a row when the surface is large, the caller is a model, the operations are mostly read-and-report, and the dominant cost is context rather than correctness.\n\nThe two are not exclusive. `input_schema` is on the row for this reason: 256 rows carry one, and those are the rows that get typed when the table is projected as an MCP tool list. The row is the storage format; the schema is one projection of it.\n\n## A row has no version number, and the receipt is where change is detectable\n\n`updated_at` is overwritten on every write. There is no version column, no history table, and no diff. What exists instead is a fingerprint computed at invocation time. `objectContractFingerprint` (`functions/_lib/object_contract.js:17-25`) hashes the fields that define the call — id, object type, runner, directory type, category, target, description, `input_schema`, auth, risk, approval requirement, status, operation semantics — and the resulting SHA-256 is stored on every receipt as `fingerprints.contract`.\n\nWhich fields count was measured directly, by invoking the same row three times with an edit in between:\n\n| Edit between invocations | Invocation | Contract fingerprint |\n| --- | --- | --- |\n| — (baseline) | `inv_vbzo55gyxb` | `fcb5a4d6ccdd552994c09c96a88c6a1dc18470d2fb1b57c151b4b951e4a7342f` |\n| `PATCH {\"examples\":\"[\\\"51.51\\|-0.13\\\"]\"}` | `inv_7s7br5887e` | `fcb5a4d6ccdd552994c09c96a88c6a1dc18470d2fb1b57c151b4b951e4a7342f` |\n| `PATCH {\"target\":\"…&current=temperature_2m,wind_speed_10m\"}` | `inv_m6c161ry9u` | `da066c304231231b32002f04aebb513f8a62bed41646e4b16845cb25c8c7fadc` |\n\nChanging `examples` left the fingerprint byte-identical. Changing `target` changed it. So the hash tracks the callable contract and ignores documentation-only edits — which is the behaviour you want, and it is worth knowing rather than assuming.\n\nTwo guarantees follow, and one gap. A capability token may be minted pinned to a contract hash; any invocation after the row changes is refused with `contract_changed:<pinned>!=<current>` and HTTP 409 (`dispatch.js:2128-2132`), so the caller is stopped rather than silently redirected. And every mutation is written to the append-only event log as a `DIRECTORY_MUTATE` record carrying the action, the key and the row (`[key].js:29-45`) — the change history exists even though the row does not keep it.\n\nThe gap: an unpinned caller invoking a changed row gets the new behaviour with no warning and learns of it from the receipt afterwards. That is the limitation, and the reason pinning exists. It is the same distinction aderix drew about version-controlling capabilities in general — approval around the definition does not help mid-flight, because the dangerous moment is the invocation, not the edit.\n\nReceipts are engine-authored, never agent-authored, and that is not stylistic. A controlled two-condition experiment found an agent inventing a governance event that never happened and presenting it as compliance evidence when nothing else wrote the record. Here the dispatcher writes it, in the same code path that runs the call, with hashes of the actual input and output bytes.\n","register":"essay","tags":["tooling","oip","architecture","d1","contracts","mcp"],"style":"canonical","claims":[{"id":"c1","text":"The directory table held 891 rows on 2026-07-26, split fn 480, http 303, agent 57, flow 51.","section":"The type column decides everything else, and it has exactly four legal values","tier":"system","source_ids":["s1","s20","s25"],"why_material":"Every size and cost argument on the page rests on the real row count and its distribution."},{"id":"c2","text":"The live directory table has eighteen columns, six from the original migration and eleven added by later ALTER TABLE statements, and created_at is present in production with no migration in the repository that adds it.","section":"Eighteen columns, of which six existed on the first day","tier":"system","source_ids":["s26"],"why_material":"A rebuild that copies only the documented schema gets a different table; the drift has to be stated, not smoothed over."},{"id":"c3","text":"type is the only column with a CHECK constraint, restricting it to fn, http, agent or flow, so a fifth runner type cannot be inserted at all.","section":"The type column decides everything else, and it has exactly four legal values","tier":"system","source_ids":["s20","s26"],"why_material":"The four-type claim is enforced by the database rather than by convention, which is what makes the runner branch total."},{"id":"c4","text":"Creating a capability is one authenticated POST that returns HTTP 201, and the new key is invocable on the next request with no deploy, restart or client refresh.","section":"Adding the 892nd capability: one POST, then a receipt proving it ran","tier":"system","source_ids":["s22"],"why_material":"This is the central property of the design; without a verified receipt it is an assertion."},{"id":"c5","text":"A capability created and invoked for the first time returned a real upstream result in 3.126264 seconds of wall clock, measured with curl -w from a laptop.","section":"Adding the 892nd capability: one POST, then a receipt proving it ran","tier":"system","source_ids":["s22"],"why_material":"Stating the cost of the no-deploy path in seconds is what turns the claim into an engineering fact."},{"id":"c6","text":"The auth column stores the name of an environment variable and never a value, so reading the entire table yields upstream URLs and twelve distinct credential names but zero credentials.","section":"The row names the environment variable; the value never enters the table","tier":"system","source_ids":["s10","s19","s21"],"why_material":"The whole registry is publicly readable; the security argument depends on this being true of every row, not most."},{"id":"c7","text":"A capability token's scope is enforced server-side by capGateCheck before any runner is reached, so a row marked sensitive is refused to a token whose risk ceiling is not high, with the literal reason risk_ceiling:low<row:high.","section":"The row names the environment variable; the value never enters the table","tier":"system","source_ids":["s10","s18"],"why_material":"Without this, a writable row would be a writable permission, and anyone who can edit the table could grant themselves anything."},{"id":"c8","text":"Reading one row with ?key=<KEY>&format=markdown returns a self-contained contract including the path, the run-now URL, the router tag, inputs and outputs, the affordances the presented credential has, and four troubleshooting entries.","section":"Reading one row returns a document that assumes the reader knows nothing","tier":"system","source_ids":["s11","s23"],"why_material":"The claim that a stranger needs no prior context is only testable against the actual document."},{"id":"c9","text":"One row's full contract is roughly 4.4 KB with under 100 bytes of variance across four row types, while the same registry fetched whole is 1,608,554 bytes for 877 objects.","section":"Reading one row returns a document that assumes the reader knows nothing","tier":"system","source_ids":["s11","s12","s13","s14","s23"],"why_material":"Fetch-on-demand versus ship-everything is a 360-fold difference in bytes; the arithmetic has to be on the page."},{"id":"c10","text":"Adding a capability without a restart depends on the caller, not the registry: the MCP spec defines notifications/tools/list_changed, and at least two clients have been reported ignoring it.","section":"The no-restart property depends on something outside the row","tier":"system","source_ids":["s3","s7","s8","s9"],"why_material":"It would be dishonest to present no-restart as a property of the storage format when independent reports show the failure is on the client side."},{"id":"c11","text":"MCP requires a tool's inputSchema to be a JSON Schema object while description is optional, which is the inverse of the row, where the docstring is mandatory and the schema is not.","section":"Where the row loses to a schema, and where a schema loses to the row","tier":"system","source_ids":["s2","s3","s6"],"why_material":"The comparison is only fair if the two formats' required fields are stated from their own specifications."},{"id":"c12","text":"The row performs no argument validation before the call, so a malformed argument is caught by the runner or the upstream rather than by a validator, which is the dimension on which it loses to JSON Schema, OpenAPI and MCP.","section":"Where the row loses to a schema, and where a schema loses to the row","tier":"system","source_ids":["s15","s2","s4","s5","s6"],"why_material":"A comparison that does not name where the design loses is advocacy, not a reference."},{"id":"c13","text":"Of 891 rows, 256 carry an input_schema and 63 carry examples, and the publish gate refuses only writes that would newly break compliance rather than forcing a backfill.","section":"Every failure names itself, and the names are in the code","tier":"system","source_ids":["s18","s21"],"why_material":"The registry's own hygiene numbers set the reader's expectation of how typed the surface actually is."},{"id":"c14","text":"A row carries no version number; the receipt carries a SHA-256 contract fingerprint that changed when target was edited and stayed byte-identical when examples was edited.","section":"A row has no version number, and the receipt is where change is detectable","tier":"system","source_ids":["s16","s24"],"why_material":"Callers need to know exactly which edits break a pinned token and which do not, and this was measured rather than inferred from the hashing code."},{"id":"c15","text":"Receipts are written by the dispatcher in the same code path that runs the call, and a deleted row's receipts still resolve and still report confirmed:true.","section":"A row has no version number, and the receipt is where change is detectable","tier":"system","source_ids":["s17","s22"],"why_material":"Deleting a definition must not delete the evidence of what it did, and agent-authored records have been shown to be fabricated."}],"sources":[{"id":"s1","type":"publisher_documentation","url":"https://developers.cloudflare.com/d1/","title":"Cloudflare D1 overview","quote":"D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.","summary":"The store the directory table lives in. A reader gets the SQL dialect (SQLite), the access paths (Worker binding and HTTP API), and the pricing tiers needed to reproduce the setup. Positive: the constraint that the whole registry is one SQLite table is a property of this product.","author":"","publisher":"Cloudflare","date":"2026-04-30","claim_ids":["c1"]},{"id":"s2","type":"publisher_documentation","url":"https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview","title":"Tool use overview — Claude Docs","quote":"To have Claude call a function that you define, pass a tool with an input_schema, then execute the call when Claude returns a tool_use block.","summary":"The competing contract format, from the vendor. A reader gets the exact shape of a schema-typed tool definition and the strict-conformance option. Negative for the row: this is what the row does not do, and the page is explicit that the schema is what guarantees the call shape.","author":"","publisher":"Anthropic","date":"2026-07-26","claim_ids":["c11","c12"]},{"id":"s3","type":"specification","url":"https://modelcontextprotocol.io/specification/2025-06-18/server/tools","title":"Model Context Protocol — Tools (2025-06-18)","quote":"When the list of available tools changes, servers that declared the listChanged capability SHOULD send a notification: { \"jsonrpc\": \"2.0\", \"method\": \"notifications/tools/list_changed\" }","summary":"The spec text for adding a capability without a restart. A reader gets the exact notification method name and the fact that it is a SHOULD on the server side with no client obligation stated, which is why the client reports below diverge.","author":"","publisher":"Model Context Protocol","date":"2025-06-18","claim_ids":["c10","c11"]},{"id":"s4","type":"specification","url":"https://json-schema.org/draft/2020-12/json-schema-validation","title":"JSON Schema Validation, draft 2020-12","quote":"Validation keywords in a schema impose requirements for successful validation of an instance. These keywords are all assertions without any annotation behavior.","summary":"Where typed tool definitions get their power: assertions evaluated against an instance before anything runs. A reader gets the vocabulary the row deliberately does not implement. Negative for the row on the validation dimension.","author":"","publisher":"JSON Schema","date":"2022-06-16","claim_ids":["c12"]},{"id":"s5","type":"specification","url":"https://spec.openapis.org/oas/v3.1.0.html","title":"OpenAPI Specification 3.1.0","quote":"The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.","summary":"The third alternative in the comparison. A reader gets the design goal — client generation and discovery by strangers — which is the dimension the row loses on outright.","author":"","publisher":"OpenAPI Initiative","date":"2021-02-15","claim_ids":["c12"]},{"id":"s6","type":"repository","url":"https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.ts","title":"modelcontextprotocol/schema.ts — the Tool interface","quote":"inputSchema: {\n    type: \"object\";\n    properties?: { [key: string]: object };\n    required?: string[];\n  };","summary":"The MCP tool contract in code rather than prose: description is optional, inputSchema is mandatory and is a JSON Schema object. Confirms the comparison table's typing row from the source of truth.","author":"","publisher":"GitHub (modelcontextprotocol)","date":"2025-06-18","claim_ids":["c11","c12"]},{"id":"s7","type":"github","url":"https://github.com/mcpjungle/MCPJungle/issues/260","title":"Dynamic tool sync: notifications/tools/list_changed + polling fallback","quote":"MCPJungle caches upstream tool lists at registration time only. If an upstream server adds or removes tools later, MCPJungle's view stays stale until a manual re-registration or full restart.","summary":"A tool-registry gateway maintainer describing the add-a-capability-without-redeploy problem from the inside: registry rows go stale and removed tools leave dangling references. Negative on the current state, positive on the registry design itself.","author":"uniq0de","publisher":"GitHub (mcpjungle/MCPJungle)","date":"2026-05-15","claim_ids":["c10"]},{"id":"s8","type":"github","url":"https://github.com/kirodotdev/Kiro/issues/6553","title":"Kiro IDE does not handle MCP notifications/tools/list_changed — dynamic tools not refreshed","quote":"When an MCP server dynamically adds or removes tools at runtime and sends this notification per the MCP spec, Kiro IDE does not re-query tools/list, so the new tools never appear until the server is manually reconnected.","summary":"Reproducible report with a minimal dynamic-registration server: the spec-compliant path for adding a capability without a restart silently does nothing in one client while working in two others. Negative — the no-redeploy story depends on client support that is not uniform.","author":"neJoe-ch","publisher":"GitHub (kirodotdev/Kiro)","date":"2026-03-20","claim_ids":["c10"]},{"id":"s9","type":"github","url":"https://github.com/microsoft/wassette/issues/308","title":"GitHub Copilot CLI does not dynamically load tools via tools/list_changed","quote":"Internal terminal testing shows the CLI never refreshes its tool list, unlike GitHub Copilot in VS Code which updates immediately.","summary":"A Microsoft engineer files the same defect against a second client, with a repro video, and notes the same vendor's editor extension behaves correctly. Negative: hot-adding a capability is specified but unevenly implemented.","author":"asw101","publisher":"GitHub (microsoft/wassette)","date":"2025-09-29","claim_ids":["c10"]},{"id":"s10","type":"hn","url":"https://news.ycombinator.com/item?id=47263727","title":"Comment on: Agentic Engineering Patterns","quote":"The agent never holds API keys directly — the proxy holds them and issues scoped, short-lived capability tokens (ES256, 60s TTL). Single enforcement point for scanning, classification, and audit.","summary":"Production patterns from a team running agents, derived from twelve rounds of red-teaming: keep secrets out of the caller's reach behind an enforcement point and hand out scoped short-lived tokens instead. Positive, and the closest independent match to the auth column plus capGateCheck design.","author":"jensbontinck","publisher":"Hacker News","date":"2026-03-05","claim_ids":["c6","c7"]},{"id":"s11","type":"hn","url":"https://news.ycombinator.com/item?id=46487491","title":"Comment on: Polymcp – toolkit for building MCP agents that discover, inspect and orchestrate tools","quote":"CLI + registry: manage MCP servers, configs, and agents from the CLI; servers can be added/removed without touching agent code.","summary":"Show HN for a toolkit built around an inspector that exposes each tool's schema and inputs/outputs plus a registry allowing add and remove with no code change. Positive, and independent confirmation that the self-describing-row-plus-registry shape is being arrived at separately.","author":"justvugg","publisher":"Hacker News","date":"2026-01-04","claim_ids":["c8","c9"]},{"id":"s12","type":"github","url":"https://github.com/abdlkrim-jribi/hcode/issues/4","title":"Reduce Context Window Usage (13,341 tokens for tools alone)","quote":"The agent injects ALL 47 tool schemas on every single request, consuming ~13,341 tokens before the user message is even sent.","summary":"A maintainer costs his own contract format and publishes the breakdown: ~4,168 static tool docs, ~4,515 static schemas, ~751 MCP docs, ~3,906 MCP schemas. Negative on definitions-in-context, and a worked example of measuring a contract format rather than arguing about it.","author":"abdlkrim-jribi","publisher":"GitHub (abdlkrim-jribi/hcode)","date":"2026-05-05","claim_ids":["c9"]},{"id":"s13","type":"hn","url":"https://news.ycombinator.com/item?id=47400262","title":"Comment on: Apideck CLI – An AI-agent interface with much lower context consumption than MCP","quote":"We built a unified API with a large surface area and ran into a problem when building our MCP server: tool definitions alone burned 50,000+ tokens before the agent touched a single user message.","summary":"A vendor engineer reports hitting 50k tokens of contracts before any work and replacing them with a thin contract plus on-demand discovery, citing a 75-run comparison. Negative on fat schemas, positive on fetch-on-demand.","author":"gertjandewilde","publisher":"Hacker News","date":"2026-03-16","claim_ids":["c9"]},{"id":"s14","type":"github","url":"https://github.com/G-Core/gcore-mcp-server/issues/14","title":"GCORE_TOOLS=* advertises ~488k tokens of tool definitions — larger than most context windows","quote":"with `GCORE_TOOLS=*` it advertises **741 tools / ~488,013 tokens** (659/tool) — that exceeds a 200K context window on its own, so the full config can't actually be used with most models.","summary":"A tiktoken harness run against a live server listing, with a per-tool average and a proposed fix. Strongly negative on definitions-in-context at scale, and the closest external comparison to this build's 891 rows.","author":"lCrazyblindl","publisher":"GitHub (G-Core/gcore-mcp-server)","date":"2026-07-11","claim_ids":["c9"]},{"id":"s15","type":"hn","url":"https://news.ycombinator.com/item?id=47381282","title":"Comment on: MCP is dead; long live MCP","quote":"Tool results from programmatic calls are not added to Claude's context window, only the final code output is. They report up to 98.7% token savings in some workflows.","summary":"The counter-argument, kept because it holds: input and output schemas let a code-writing agent plan one precise program instead of a print-and-inspect loop. Positive on schema-as-contract and explicitly against reducing the question to schema bloat — the reason the verdict here is conditional rather than absolute.","author":"menix","publisher":"Hacker News","date":"2026-03-14","claim_ids":["c12"]},{"id":"s16","type":"hn","url":"https://news.ycombinator.com/item?id=47417059","title":"Comment on: Show HN: GitAgent – An open standard that turns any Git repo into an AI agent","quote":"If an LLM hallucinates in production and decides to execute a destructive tool defined in SKILL.md (like dropping a table or issuing a Stripe refund), a Git PR approval process doesn't help you mid-flight.","summary":"Argues that version-controlling capability definitions is configuration management, not runtime control, so the invocation needs its own interception point. Negative on definition-time governance — the reason contract pinning is evaluated at call time here rather than at edit time.","author":"aderix","publisher":"Hacker News","date":"2026-03-17","claim_ids":["c14"]},{"id":"s17","type":"hn","url":"https://news.ycombinator.com/item?id=47579314","title":"Comment on: Agent Runs Code You Never Wrote","quote":"fabricated an audit record — invented a governance event that never happened and presented it as compliance evidence.","summary":"A controlled two-condition experiment: with no runtime enforcement the agent authored its own audit record and it was false. Negative about agent-authored receipts, positive about engine-authored ones — the reason the receipt here is written by the dispatcher.","author":"zippolyon","publisher":"Hacker News","date":"2026-03-30","claim_ids":["c15"]},{"id":"s18","type":"hn","url":"https://news.ycombinator.com/item?id=46747408","title":"Comment on: Ask HN: How are you enforcing permissions for AI agent tool calls in production?","quote":"The audit trail piece is critical too. Being able to answer \"why was this blocked?\" after the fact builds trust with teams rolling this out.","summary":"Puts the enforcement point in a proxy outside the agent's context with argument-level rather than tool-level rules. Positive, and the practical argument for denial reasons that name themselves — the literal risk_ceiling and contract_changed strings in the failure table.","author":"kxbnb","publisher":"Hacker News","date":"2026-01-24","claim_ids":["c13","c7"]},{"id":"s19","type":"github","url":"https://github.com/rafaself/aws-mcp-gateway/issues/21","title":"Add sanitized audit logging contract for MCP tool calls","quote":"Add structured audit logging for MCP tool calls without exposing credentials, signed request data, raw AWS responses, or CloudWatch log message contents.","summary":"Specifies the receipt as a thin layer with an explicit non-goals list — no credentials, no raw bodies. Positive, and an independent statement of the redaction rule applied to shape previews and logged requests here.","author":"rafaself","publisher":"GitHub (rafaself/aws-mcp-gateway)","date":"2026-06-19","claim_ids":["c6"]},{"id":"s20","type":"runtime_receipt","url":"https://miscsubjects.com/api/dispatch?registry=1","title":"Row counts by type, taken from production D1 on 2026-07-26","quote":"fn 480 | http 303 | agent 57 | flow 51","summary":"Method: npx wrangler d1 execute loop-content-spine --remote --command \"SELECT type, COUNT(*) AS n FROM directory GROUP BY type ORDER BY n DESC;\" run from the repository root, database name read from wrangler.toml. Totals 891. Rerunnable by anyone with the binding.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c1","c3"]},{"id":"s21","type":"runtime_receipt","url":"https://miscsubjects.com/api/directory","title":"Credential forms and registry hygiene across all 891 rows","quote":"(none) 636 | headers: 139 | bearer: 68 | basic: 45 | query: 2","summary":"Two SQL statements published in the article: one grouping rows by the prefix of the auth column, one counting input_schema, examples, disabled and sensitive rows. Results: 115 credentialed rows referencing 12 distinct auth specifications, 256 with input_schema, 63 with examples, 13 disabled, 227 sensitive, 110 categories.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c13","c6"]},{"id":"s22","type":"runtime_receipt","url":"https://miscsubjects.com/receipt/inv_c23irnzhx1","title":"Receipt for the first invocation of a capability created minutes earlier","quote":"\"ok\": true, \"ran\": true, \"result\": \"HTTP 200:{...\\\"temperature_2m\\\":15.7}\", \"invocation_id\": \"inv_c23irnzhx1\"","summary":"Method: POST /api/directory to create ZZ_TEST_TEMPERATURE, then POST /api/dispatch with body 37.77|-122.42, timed with curl -w. 3.126264 s wall clock including the upstream call. The row was deleted afterwards; the receipt still resolves and still reports confirmed:true.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c15","c4","c5"]},{"id":"s23","type":"runtime_receipt","url":"https://miscsubjects.com/api/dispatch?key=GROK_MODELS&format=markdown","title":"Contract size, measured across four rows of four different types","quote":"NOW 4423 bytes | GROK_MODELS 4413 bytes | ROUTER 4442 bytes | CONTENT_SEARCH 4507 bytes","summary":"Method: curl -s \"https://miscsubjects.com/api/dispatch?key=<KEY>&format=markdown\" | wc -c for each key. Under 100 bytes of variance across a fn, an http, an agent and a flow row. The same registry fetched whole is 1,608,554 bytes for 877 objects.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c8","c9"]},{"id":"s24","type":"runtime_receipt","url":"https://miscsubjects.com/api/dispatch?confirm=inv_m6c161ry9u","title":"Which row edits change the contract fingerprint, measured by three invocations","quote":"baseline fcb5a4d6ccdd5529... | after examples edit fcb5a4d6ccdd5529... | after target edit da066c3042312313...","summary":"Method: invoke the row, PATCH one field, invoke again, and read invocation.fingerprints.contract from each response. Editing examples left the SHA-256 byte-identical; editing target changed it. Establishes that the hash tracks the callable contract and ignores documentation-only edits.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c14"]},{"id":"s26","type":"runtime_receipt","url":"https://miscsubjects.com/api/directory","title":"The production CREATE TABLE and column list, read back from D1","quote":"CREATE TABLE directory (\n  key        TEXT PRIMARY KEY,\n  type       TEXT NOT NULL CHECK (type IN ('fn','http','agent','flow')),","summary":"Method: npx wrangler d1 execute loop-content-spine --remote --command \"SELECT sql FROM sqlite_master WHERE name='directory';\" and PRAGMA table_info(directory), both against the remote database. Eighteen columns; comparing them to grep -rn \"ALTER TABLE directory\" over the repository shows created_at has no migration behind it.","author":"","publisher":"miscsubjects.com","date":"2026-07-26","claim_ids":["c2","c3"]},{"id":"s25","type":"repository","url":"https://github.com/cloudflare/workers-sdk","title":"cloudflare/workers-sdk — wrangler, the tool every measurement here was taken with","quote":"wrangler","summary":"The CLI behind npx wrangler d1 execute --remote. A reader gets the source for the command used in every first-party measurement on this page, so the harness is inspectable rather than asserted.","author":"","publisher":"GitHub (cloudflare)","date":"2026-07-26","claim_ids":["c1"]}],"prov":{"model":"Opus 5 (Claude Code)","action":"write"}}