Skip to content

Commit 1377fb6

Browse files
committed
j
1 parent 1b5fc85 commit 1377fb6

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

worker/src/index.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const FALLBACK_RPCS = [
4444
];
4545
const SITE = "https://gblin.digital";
4646
const SUPPORTED_PROTOCOLS = ["2025-06-18", "2025-03-26", "2024-11-05"];
47-
const SERVER_INFO = { name: "gblin-mcp-http", version: "0.3.0" };
47+
const SERVER_INFO = { name: "gblin-mcp-http", version: "0.3.1" };
4848

4949
// ── Tools ───────────────────────────────────────────────────────────────────
5050

@@ -121,7 +121,7 @@ const TOOLS = [
121121
name: "get_market_risk_regime",
122122
description:
123123
"Current BTC/ETH risk regime (calm | elevated | crash) with a suggested posture, read live from GBLIN's on-chain Crash Shield on Base (60s cache). Free and unsigned; a signed, verifiable-offline version is a paid x402 endpoint (resource gblin://howto/attestation).",
124-
inputSchema: { type: "object", properties: {}, required: [] },
124+
inputSchema: { type: "object", properties: {}, required: [], additionalProperties: false },
125125
annotations: { title: "Market risk regime (live, free)", ...RO },
126126
outputSchema: {
127127
type: "object",
@@ -159,7 +159,7 @@ const TOOLS = [
159159
name: "get_attestation_sample",
160160
description:
161161
"Static, permanently expired sample of the signed Risk Attestation (sample:true), same fields and EIP-712 schema as the paid one. Use it to build and test a parser/verifier.",
162-
inputSchema: { type: "object", properties: {}, required: [] },
162+
inputSchema: { type: "object", properties: {}, required: [], additionalProperties: false },
163163
annotations: { title: "Attestation sample (free, expired)", ...RO },
164164
outputSchema: {
165165
type: "object",
@@ -184,7 +184,7 @@ const TOOLS = [
184184
name: "get_agent_economy_stats",
185185
description:
186186
"Cumulative public counters of GBLIN's x402 endpoints: paid calls, unique payer wallets, USDC earned, with methodology disclosure. Cached 5 min.",
187-
inputSchema: { type: "object", properties: {}, required: [] },
187+
inputSchema: { type: "object", properties: {}, required: [], additionalProperties: false },
188188
annotations: { title: "Agent-economy stats (free, cached)", ...RO },
189189
outputSchema: {
190190
type: "object",
@@ -208,7 +208,7 @@ const TOOLS = [
208208
name: "get_protocol_info",
209209
description:
210210
"GBLIN llms.txt as plain text: contract addresses, endpoints, prices, payment flow, field contract of the attestation.",
211-
inputSchema: { type: "object", properties: {}, required: [] },
211+
inputSchema: { type: "object", properties: {}, required: [], additionalProperties: false },
212212
annotations: { title: "Protocol info / llms.txt (free)", ...RO },
213213
outputSchema: {
214214
type: "object",
@@ -226,22 +226,23 @@ const TOOLS = [
226226
type: "object",
227227
properties: {
228228
mode: { type: "string", enum: ["demo"], default: "demo", description: "Only 'demo' is available over MCP (5/day/IP). Paid seals go through x402 HTTP." },
229-
action: { type: "string", description: "What the AI did, short label (<=128 chars)" },
230-
input_hash: { type: "string", description: "sha256 hex (64 chars) of the input/prompt" },
231-
output_hash: { type: "string", description: "sha256 hex of the output (optional)" },
232-
agent_id: { type: "string", description: "Your agent identifier (optional, <=128)" },
233-
tool: { type: "string", description: "Tool/model used (optional, <=128)" },
234-
meta: { type: "string", description: "Extra JSON, <=512 chars (optional)" },
229+
action: { type: "string", minLength: 1, maxLength: 128, description: "What the AI did, short label. PUBLISHED in the log." },
230+
input_hash: { type: "string", pattern: "^[0-9a-fA-F]{64}$", description: "sha256 of the input/prompt, 64 hex chars" },
231+
output_hash: { type: "string", pattern: "^[0-9a-fA-F]{64}$", description: "sha256 of the output, 64 hex chars (optional)" },
232+
agent_id: { type: "string", maxLength: 128, description: "Your agent identifier (optional). PUBLISHED." },
233+
tool: { type: "string", maxLength: 128, description: "Tool/model used (optional). PUBLISHED." },
234+
meta: { type: "string", maxLength: 512, description: "Extra JSON object as a string (optional). PUBLISHED." },
235235
},
236236
required: ["mode", "action", "input_hash"],
237+
additionalProperties: false,
237238
},
238239
annotations: { title: "Seal an AI action (demo receipt)", readOnlyHint: false, idempotentHint: false, openWorldHint: false },
239240
outputSchema: RECEIPT_SCHEMA,
240241
},
241242
{
242243
name: "get_receipt",
243244
description: "Receipt #index from GBLIN's receipts log, re-signed (Ed25519 is deterministic) with a fresh inclusion proof, the current signed checkpoint and the latest on-chain anchor. Free.",
244-
inputSchema: { type: "object", properties: { index: { type: "integer", minimum: 0, description: "Receipt index in the log" } }, required: ["index"] },
245+
inputSchema: { type: "object", properties: { index: { type: "integer", minimum: 0, description: "Receipt index in the log (0-based; current size at GET /log/checkpoint)" } }, required: ["index"], additionalProperties: false },
245246
annotations: { title: "Get a receipt by index", ...RO },
246247
outputSchema: RECEIPT_SCHEMA,
247248
},
@@ -252,6 +253,7 @@ const TOOLS = [
252253
type: "object",
253254
properties: { receipt: { type: "object", description: "The receipt JSON as returned by seal_action / get_receipt / GET /v1/receipt/:i (bare or wrapped in {receipt})" } },
254255
required: ["receipt"],
256+
additionalProperties: false,
255257
},
256258
annotations: { title: "Verify a receipt (pure math)", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
257259
outputSchema: {
@@ -270,7 +272,7 @@ const TOOLS = [
270272
name: "get_coherence_report",
271273
description:
272274
"Kept/violated tallies for GBLIN's pre-registered, hash-pinned promises (attestation uptime, counter honesty), probed every 10 minutes; each closed UTC day is sealed on Base as an EAS attestation (schema 0x9f433a96…). Self-observation only in v0. Free.",
273-
inputSchema: { type: "object", properties: {}, required: [] },
275+
inputSchema: { type: "object", properties: {}, required: [], additionalProperties: false },
274276
annotations: { title: "Coherence report (promises vs conduct, free)", ...RO },
275277
outputSchema: {
276278
type: "object",

0 commit comments

Comments
 (0)