Engineering
No CRM write is reachable over MCP
No CRM write is reachable over MCP. The only writes are Social checklist drafts and evidence (approval-bound) and gated LinkedIn execution, each behind its own scope.
Two filters decide what an AI assistant connected over MCP can do. One keeps every GET operation as a read tool. The other admits a POST as a write tool only when its scope is on a short reviewed list, and no CRM write scope is on it.
Every REST tool offered over MCP is produced by mapping over one of those two filters. Nothing adds a tool by hand.
The consequence is worth stating precisely, because the precise version is the interesting one. A CRM write tool on this surface is unrepresentable. Every CRM write route asserts a scope that is on neither write list, so no edit to the census can turn one into a tool.
Allowlists describe. Derivations produce.
The usual way to build this is a hand-written list of permitted tools. It works, right up until it does not, and the way it stops working is always the same: somebody adds a capability somewhere else, and the list is not updated, or is updated by copying a nearby line.
The failure is silent in both directions. Forget to add a safe tool and a feature is quietly missing. Add a dangerous one by pattern-matching on the line above it and you have shipped a write path to an external agent with a diff that looks like configuration.
The reason an allowlist cannot defend against that is structural, not cultural. An allowlist is a statement about a set. It sits in one file, the thing it describes lives in another, and nothing binds them. So the statement can be wrong without anything failing.
A derivation inverts the dependency. The list is not a description of the surface; the list is computed from the surface. Adding a CRM write route to the public API adds a POST entry to the census. Its scope is not on a write list, so nothing appears as a tool. Not because anyone remembered. Because the write filter reads the scope, and no CRM write scope is on its list.
The floors, which are the part people leave out
A derivation has a failure mode an allowlist does not: it can compute an empty set and report success. Zero tools is a perfectly clean-looking answer that means the derivation is broken.
So there are three floors in that module, and they all throw rather than return.
If the filter produces zero read operations, the function throws with a message saying an empty read surface is an error and not a result. If the Brain view registry is empty, same. And the list of Brain subject types the surface may read is checked at module import: if it computes to empty, the module throws on load, with the reasoning written in the comment above it, that an empty readable set would advertise an empty schema and reject every call while looking like a configuration choice.
There are three more throws inside the mapping itself. If an operation is in the census but missing from the specification document, it throws. If it has no operation identifier, it throws. If it declares no recognised API key scope, it throws. The doc comment says the design rule out loud: fail loud, never silently narrow.
That is the whole discipline in one phrase. A surface that silently gets smaller looks identical to a surface that was always that size.
The compiler as the second half of the gate
The Brain half of the tool list is not filtered, because there is nothing to filter it on. It is bound instead.
The three Brain read tools are declared as an exhaustive Record over the claim store's closed union of view names. That makes the compiler enforce both directions: adding a new read view to the store breaks the build until somebody deliberately writes a description for it, and removing a view breaks the build until it is dropped here. Exposing an internal read view to an external agent stops being a default and becomes an edit somebody has to make on purpose.
The best beat in the module is what happened when that control actually fired. Two new subject types were added to the store for an internal handoff feature, and the compiler failed the tool surface, exactly as designed. The comment records the temptation and refuses it: the lazy repair was to set the new entry to true, and doing that would have widened an external, key-authenticated API surface to internal delivery obligations as a silent side effect of an internal type growing.
So the map now carries decisions with reasons rather than booleans. Commitments and requirements are false because they are what staff promised a customer, and the internal ledger is their audience. Competitor intelligence is false with a longer reason: it is machine-derived from public pages and is only safe to read next to its source and its age, and an external client cannot be obliged to render either. The comment ends by saying it is false on purpose and not pending wiring, which is a distinction most codebases never bother to write down.
One more detail in the same module is a genuine language trap, and it is worth carrying away even if you never touch MCP. The runtime permission check is a membership test against the derived array, not a property test against the map, because in JavaScript "commitment" in obj is true whatever the value is. A gate written the obvious way would have permitted every subject type in the map, including the three deliberately set to false.
The census, and the test that binds it
The derivation chain is: route files, to a census of operations, to an OpenAPI document, to the two filters, to a tool list. All five links are now computed, checked or compiler-enforced. A test walks the route files and fails if the census disagrees with them.
The operation census is a hand-typed array in the public API specification module, and a test binds it to the route files.
The no-CRM-write property holds. A CRM write scope cannot be added to a write list without failing a pinned test.
The honest bound
Read tools come from every GET operation in the public API and from three Brain read views, all annotated read-only. Write tools are limited to Social checklist submissions and evidence and LinkedIn execution, and none are annotated read-only. The OpenAPI document itself is served unauthenticated, because it is documentation, so the operation list is checkable from outside the source tree.
The surface an external model can reach is enumerable. Adding a write scope means editing one of two reviewed lists in the module, and the approval-bound list is pinned by its test.
The question worth asking any vendor offering an MCP or agent integration is not whether their tools are read-only today. It is what would have to happen for a write tool to appear on that surface: an edit to a list, or a change to a filter that runs against everything the product exposes.
- Model Context Protocol: Schema reference (2025-06-18), ToolAnnotations readOnlyHintmodelcontextprotocol.io/specification/2025-06-18/schemaread 10 Nov 2026