Call skills over MCP
An agent uses skills through one MCP server per tenant, served by the Core Proxy:
POST http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-{tenant}It speaks MCP JSON-RPC 2.0 over Streamable HTTP, POST only (any other method returns
405). Authenticate with an API key or a gateway JWT as Authorization: Bearer. The
examples use the Demo System’s group-scoped key and tenant default.
| Method | Answer |
|---|---|
initialize |
Server info and the L1 catalog in instructions |
server/discover |
The same catalog in instructions, for 2026-07-28 (stateless) clients |
tools/list |
The five skills__* tools. Skills themselves are never listed as tools |
tools/call |
One of the five tools |
ping, notifications/initialized |
Empty result (a notification without an id gets 202) |
resources/list, resources/templates/list, prompts/list |
Empty lists |
The agent’s loop
Section titled “The agent’s loop”- Discover:
skills__list, or read the catalog ininitialize.instructions. - Load:
skills__loadwith the skill’s name. Read the instructions and the manifest. - Act: follow the instructions with
skills__run_script,skills__read_resourceandskills__render_template, one call per step, using the names from the manifest.
A model-driven agent does all three. An agent with a fixed graph that already knows which
script it needs and what it takes may call skills__run_script directly, as the Brutor
Demo System’s screening agent does (Register and run a skill).
Every layer checks access on its own, so skipping discovery and load skips nothing in
governance.
L1 Discover
Section titled “L1 Discover”initialize
Section titled “initialize”curl -s -X POST http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default \ -H "Authorization: Bearer $BRUTOR_API_KEY" -H "X-Tenant-ID: default" \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 0, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "brutor-demo-screening-agent", "version": "0.2.0"}}}'{ "jsonrpc": "2.0", "id": 0, "result": { "protocolVersion": "2024-11-05", "capabilities": { "tools": {"listChanged": true}, "resources": {"listChanged": false}, "prompts": {"listChanged": false} }, "serverInfo": {"name": "brutor-agent-skills", "version": "1.0.0"}, "instructions": "These tools give you access to governed Agent Skills. Skills are guided workflows, not tools. Call `skills__list` to see which skills are available to you (the catalog is also listed below). To use one, call `skills__load` with its name to read its full instructions (SKILL.md) and its manifest of scripts, resources and templates; then follow those instructions using `skills__read_resource`, `skills__run_script`, and `skills__render_template`. Skill code runs only inside Brutor's governed sandbox — never attempt to fetch or execute it another way.\n\nAvailable skills — call `skills__load` with the name to use one:\n- affordability-check: Deterministic affordability assessment for a consumer loan application (annuity installment, DTI, disposable income; comfortable / tight / unaffordable).\n" }}MCP clients fold instructions into the model’s context. Each catalog line is the skill’s
name and description (trimmed to 240 characters). A caller with no skills gets “No skills
are currently available to you.” instead of the list. A 2026-07-28 client that sends
server/discover gets the same text in that result’s instructions field, cacheable only
for the same caller (private, 60 seconds).
skills__list
Section titled “skills__list”Some clients drop instructions. The catalog is also a tool, which every client surfaces:
curl -s -X POST http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default \ -H "Authorization: Bearer $BRUTOR_API_KEY" -H "X-Tenant-ID: default" \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "skills__list", "arguments": {}}}'import json, httpx
SKILLS = "http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default"gw = httpx.Client(headers={"Authorization": f"Bearer {BRUTOR_API_KEY}", "X-Tenant-ID": "default"}, timeout=60)
def call_tool(name: str, arguments: dict, rpc_id: int = 1) -> dict: r = gw.post(SKILLS, json={"jsonrpc": "2.0", "id": rpc_id, "method": "tools/call", "params": {"name": name, "arguments": arguments}}) r.raise_for_status() body = r.json() if "error" in body: # JSON-RPC error (see Errors below) raise RuntimeError(body["error"]["message"]) return body["result"] # {"content": [...], "isError": bool}
catalog = json.loads(call_tool("skills__list", {})["content"][0]["text"])print([s["name"] for s in catalog["skills"]]) # ['affordability-check']const SKILLS = "http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default";
async function callTool(name, args, id = 1) { const r = await fetch(SKILLS, { method: "POST", headers: { Authorization: `Bearer ${process.env.BRUTOR_API_KEY}`, "X-Tenant-ID": "default", "Content-Type": "application/json", }, body: JSON.stringify({ jsonrpc: "2.0", id, method: "tools/call", params: { name, arguments: args } }), }); const body = await r.json(); if (body.error) throw new Error(body.error.message); return body.result; // { content: [...], isError }}
const catalog = JSON.parse((await callTool("skills__list", {})).content[0].text);console.log(catalog.skills.map((s) => s.name)); // [ 'affordability-check' ]{ "jsonrpc": "2.0", "id": 1, "result": { "content": [{ "type": "text", "text": "{\n \"skills\": [\n {\n \"name\": \"affordability-check\",\n \"description\": \"Deterministic affordability assessment for a consumer loan application (annuity installment, DTI, disposable income; comfortable / tight / unaffordable).\"\n }\n ]\n}" }], "isError": false }}Both lists contain the published, enabled skills assigned to the caller’s groups (who is scoped to what).
tools/list
Section titled “tools/list”tools/list returns the same five tools for every caller. Their annotations tell clients
and the gateway’s risk classification which ones change
anything: only skills__run_script is not read-only.
{ "jsonrpc": "2.0", "id": 2, "result": { "tools": [ {"name": "skills__list", "inputSchema": {"type": "object", "properties": {}, "required": []}, "annotations": {"readOnlyHint": true, "idempotentHint": true, "openWorldHint": false}}, {"name": "skills__load", "inputSchema": {"type": "object", "properties": {"skill_name": {"type": "string"}}, "required": ["skill_name"]}, "annotations": {"readOnlyHint": true, "idempotentHint": true, "openWorldHint": false}}, {"name": "skills__read_resource", "inputSchema": {"type": "object", "properties": {"skill_name": {"type": "string"}, "path": {"type": "string"}}, "required": ["skill_name", "path"]}, "annotations": {"readOnlyHint": true, "idempotentHint": true, "openWorldHint": false}}, {"name": "skills__run_script", "inputSchema": {"type": "object", "properties": {"skill_name": {"type": "string"}, "script": {"type": "string"}, "args": {"type": "object", "additionalProperties": true}, "approval_token": {"type": "string"}}, "required": ["skill_name", "script"]}, "annotations": {"readOnlyHint": false}}, {"name": "skills__render_template", "inputSchema": {"type": "object", "properties": {"skill_name": {"type": "string"}, "template": {"type": "string"}, "vars": {"type": "object", "additionalProperties": true}}, "required": ["skill_name", "template"]}, "annotations": {"readOnlyHint": true, "idempotentHint": true, "openWorldHint": false}} ] }}The description of each tool is omitted above. Clients that prefix tool names with the
server name (Goose sends brutor__skills__run_script) work unchanged: the server matches
on the suffix.
L2 Load
Section titled “L2 Load”curl -s -X POST http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default \ -H "Authorization: Bearer $BRUTOR_API_KEY" -H "X-Tenant-ID: default" \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "skills__load", "arguments": {"skill_name": "affordability-check"}}}'The result has two text blocks. The first is a protocol preamble followed by the
unmodified SKILL.md; the second is the skill’s identity and manifest as JSON:
{ "jsonrpc": "2.0", "id": 3, "result": { "content": [ { "type": "text", "text": "[Brutor progressive-disclosure protocol] You have loaded this skill's instructions. Follow the SKILL.md below. Whenever it tells you to run a script, call `skills__run_script` with this skill's name, the script filename (from the manifest), and its arguments. To read a referenced file, call `skills__read_resource`. To render a template or asset, call `skills__render_template`. Use the manifest for the exact script / resource / template names and their input schemas. Do not use a local shell or fetch files directly — all execution happens in Brutor's governed sandbox.\n\n----- SKILL.md (affordability-check) -----\n\n---\nname: affordability-check\ndescription: Deterministic affordability assessment ...\n---\n\n# Affordability Check\n..." }, { "type": "text", "text": "{\n \"skill\": {\n \"name\": \"affordability-check\",\n \"version\": \"1.0.0\",\n \"description\": \"Deterministic affordability assessment for a consumer loan application (...)\"\n },\n \"manifest\": {\n \"resources\": [\n {\"path\": \"policy.md\", \"kind\": \"reference\", \"mime\": \"text/markdown\", \"bytes\": 3636}\n ],\n \"scripts\": [\n {\"name\": \"affordability.py\", \"language\": \"python\", \"execution_mode\": \"sandbox\", \"args_schema\": null, \"description\": \"Borealis affordability policy (stdlib only).\"}\n ],\n \"templates\": []\n }\n}" } ], "isError": false }}The manifest is the allowlist for L3: resources[].path, scripts[].name and
templates[].name are the only values the act tools accept, matched exactly. Scripts in
disabled mode are not listed. Loading runs nothing, but it is a governed event with its
own audit row (proxy_subtype: skill_load).
L3 Act
Section titled “L3 Act”skills__run_script
Section titled “skills__run_script”Runs one script from the manifest in the sandbox and returns only its output. This is the call the Demo System makes, as recorded in its audit trail:
curl -s -X POST http://localhost:8100/v1/proxy/mcp/system-agent-skill-server-default \ -H "Authorization: Bearer $BRUTOR_API_KEY" -H "X-Tenant-ID: default" \ -H "Content-Type: application/json" \ -H "X-Correlation-ID: 0549f0f8-52dd-4fa4-a748-04e1f57520f2" \ -d '{"jsonrpc": "2.0", "id": 35, "method": "tools/call", "params": {"name": "skills__run_script", "arguments": {"skill_name": "affordability-check", "script": "affordability.py", "args": {"monthly_income_eur": 2400.0, "monthly_expenses_eur": 1010.0, "existing_debt_monthly_eur": 230.0, "requested_amount_eur": 21700.0, "term_months": 72}}}}'result = call_tool("skills__run_script", { "skill_name": "affordability-check", "script": "affordability.py", "args": {"monthly_income_eur": 2400.0, "monthly_expenses_eur": 1010.0, "existing_debt_monthly_eur": 230.0, "requested_amount_eur": 21700.0, "term_months": 72},}, rpc_id=35)text = result["content"][0]["text"]if result["isError"]: raise RuntimeError(text) # e.g. "skill_error_403: agent_not_authorized: ..."assessment = json.loads(text)print(assessment["affordability_class"]) # comfortableconst result = await callTool("skills__run_script", { skill_name: "affordability-check", script: "affordability.py", args: { monthly_income_eur: 2400.0, monthly_expenses_eur: 1010.0, existing_debt_monthly_eur: 230.0, requested_amount_eur: 21700.0, term_months: 72 },}, 35);const text = result.content[0].text;if (result.isError) throw new Error(text);console.log(JSON.parse(text).affordability_class); // comfortable{ "id": 35, "jsonrpc": "2.0", "result": { "content": [{ "type": "text", "text": "{\"affordability_class\": \"comfortable\", \"disposable_after_eur\": 763.44, \"dti_after\": 0.2611, \"dti_before\": 0.0958, \"flags\": [], \"inputs\": {\"annual_rate_pct\": 9.5, \"existing_debt_monthly_eur\": 230.0, \"monthly_expenses_eur\": 1010.0, \"monthly_income_eur\": 2400.0, \"requested_amount_eur\": 21700.0, \"term_months\": 72}, \"monthly_installment_eur\": 396.56, \"policy_version\": \"2026.09\"}" }], "isError": false }}The text is the script’s stdout. When the script exits non-zero, isError is true and
the text is its stderr (or Script exited with code N). args reaches the script as
{"input_params": {...}} on stdin and in SKILL_INPUT
(the script contract).
| Argument | Required | Example |
|---|---|---|
skill_name |
Yes | affordability-check |
script |
Yes, exactly as scripts[].name in the manifest |
affordability.py |
args |
No. An object, checked against guardrails and argument policies before the run | {"term_months": 72} |
approval_token |
Only to retry a run an approver released (approvals) | Zk3v... |
group_id |
No. Bill and govern the run against this group; it must be one the caller belongs to | group-01M61N376V2RR6J2TV7Q7EVRET |
Scripts in one workflow share a workspace. The runner keys a session workspace on the
request’s correlation id. Send the same X-Correlation-ID header on every call of one
workflow and a file one script writes is there for the next; without the header every call
gets a fresh id and a fresh workspace. See session workspaces.
skills__read_resource
Section titled “skills__read_resource”Returns one reference file, after the output guardrail:
{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "skills__read_resource", "arguments": {"skill_name": "affordability-check", "path": "policy.md"}}}{ "jsonrpc": "2.0", "id": 5, "result": { "content": [{ "type": "text", "mimeType": "text/markdown", "text": "# Borealis Consumer Finance AB: Affordability Policy\n\nPolicy version: 2026.09\n..." }], "isError": false }}skills__render_template
Section titled “skills__render_template”Substitutes {{var}} and {{ var }} in a template from the manifest and returns the
result, after the output guardrail. Placeholders with no matching var stay as they are.
{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "skills__render_template", "arguments": {"skill_name": "affordability-check", "template": "summary.md", "vars": {"application_id": "APP-20261027-0497", "affordability_class": "comfortable", "dti_after": 0.2611}}}}{ "jsonrpc": "2.0", "id": 6, "result": { "content": [{"type": "text", "text": "Application APP-20261027-0497: **comfortable** (DTI after 0.2611)."}], "isError": false }}The summary.md template is the example from
Add templates and assets; the demo
skill itself ships none.
Errors
Section titled “Errors”The transport answers HTTP 200 to a well-formed tools/call, whatever the governance
outcome. A refusal comes back as a tool result with isError: true and a model-readable
message, so the model can explain it or change course:
{ "jsonrpc": "2.0", "id": 3, "result": { "content": [{"type": "text", "text": "Access denied: skill 'affordability-check' is not available to your group."}], "isError": true }}The real verdict (403, 202, 503, …) is on the audit row,
not in the HTTP status. The messages an agent can see:
| Text starts with | Cause | On |
|---|---|---|
Access denied: skill '...' is not available to your group. |
The skill is not assigned to any of the caller’s groups | load, read, render |
skill_error_403: Skill is not assigned to the target group |
The same, from the run pipeline | run |
Skill '...' not found: / Skill '...' could not be loaded: |
No published, enabled skill of that name | all |
script '...' is not part of skill '...' / script '...' is disabled |
Not in the manifest, or disabled mode |
run |
resource '...' is not part of skill '...' / template '...' is not part of skill '...' |
Not in the manifest | read, render |
Skill input blocked by guardrail '...' (check=...) |
A skill_input guardrail on args |
run |
Argument policy (<policy>/<rule>): ... |
An argument policy denied args |
run |
skill_error_403: agent_not_authorized: ... |
The agent identity has no skill_exec grant for this skill id |
run |
skill_error_403: autonomy_denied: ... |
The AI System’s autonomy level does not allow running code | run |
skill_error_403: Skill execution is disabled for group '...' |
Execution mode disabled |
run |
skill_error_403: ... (quota message) |
The group’s or the skill’s execution quota is spent | run |
skill_error_409: Max concurrent skill executions reached (n/m) for group '...' |
max_concurrent_executions |
run |
skill_error_429: ... / skill_error_403: run_aborted: ... |
The run’s cap is reached, or an operator stopped the run | run |
skill_error_202: approval_required (428 for a portal user) |
An approval-required skill_exec grant |
run |
{"status": "pending_approval", ...} with isError: false |
The execution mode requires approval | run |
Skill output blocked by guardrail '...' |
A skill_output guardrail on the output, resource or rendered template |
run, read, render |
Skill runner error: ... |
The runner was unreachable or failed | run |
guardrails_unavailable: ... / skill_unavailable: ... |
The gateway could not read what it needs to decide. It refuses rather than guess | run |
Two outcomes are JSON-RPC errors instead of tool results, so check for error in the
body as well as isError:
{"jsonrpc": "2.0", "id": 35, "error": {"code": -32602, "message": "semantic_policy_blocked: <reason>"}}-32602 is a semantic policy on the skill_input surface
refusing the arguments; -32603 “The skills store could not be read; retry” is a database
failure. An unknown method returns -32601, and a body that is not JSON -32700.

