Kantoor. MCP. Interface
(Kantoor v1.0.0)
The caller of one MCP request: the person behind the OAuth token, the token's scopes, and the client that approved it. Every operation goes through here, which checks the scopes and the person's role, applies the installation's switch and tool groups, runs the same context function the web interface uses, and audits the call.
The interface is also the single place a destructive operation becomes a dry
run: without confirm: true nothing is dispatched, and the answer says what
the call would have done.
Summary
Functions
Whether the identity may run entry at all.
Runs one tool. Returns {:ok, data, meta} or {:error, sentence}; every
outcome is audited.
A sentence for an error returned by a context function.
Builds the interface for an authenticated request.
Why the identity may not run entry, or nil when it may.
The scope's id for the audit, when a caller needs it.
The person's id.
Types
Functions
@spec allowed?(t() | nil, Kantoor.MCP.Entry.t()) :: boolean()
Whether the identity may run entry at all.
Runs one tool. Returns {:ok, data, meta} or {:error, sentence}; every
outcome is audited.
A sentence for an error returned by a context function.
Builds the interface for an authenticated request.
@spec refusal(t() | nil, Kantoor.MCP.Entry.t()) :: String.t() | nil
Why the identity may not run entry, or nil when it may.
The scope's id for the audit, when a caller needs it.
The person's id.