@gblin-protocol/mcp-server 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +49 -20
- package/README.md +110 -11
- package/dist/abi.d.ts +27 -0
- package/dist/abi.d.ts.map +1 -1
- package/dist/abi.js +1 -0
- package/dist/abi.js.map +1 -1
- package/dist/actions.d.ts +306 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +740 -0
- package/dist/actions.js.map +1 -0
- package/dist/auction.d.ts.map +1 -1
- package/dist/auction.js +5 -4
- package/dist/auction.js.map +1 -1
- package/dist/config.d.ts +20 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -6
- package/dist/config.js.map +1 -1
- package/dist/helpers.d.ts +6 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +37 -13
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -20
- package/dist/index.js.map +1 -1
- package/dist/output-schemas.d.ts +18 -0
- package/dist/output-schemas.d.ts.map +1 -0
- package/dist/output-schemas.js +243 -0
- package/dist/output-schemas.js.map +1 -0
- package/dist/payments.d.ts +170 -0
- package/dist/payments.d.ts.map +1 -0
- package/dist/payments.js +524 -0
- package/dist/payments.js.map +1 -0
- package/dist/paywall.d.ts +10 -1
- package/dist/paywall.d.ts.map +1 -1
- package/dist/paywall.js +1 -1
- package/dist/paywall.js.map +1 -1
- package/dist/prompts.d.ts +33 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +139 -0
- package/dist/prompts.js.map +1 -0
- package/dist/receipts.d.ts +2 -1
- package/dist/receipts.d.ts.map +1 -1
- package/dist/receipts.js +16 -12
- package/dist/receipts.js.map +1 -1
- package/dist/resources.d.ts +17 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +146 -0
- package/dist/resources.js.map +1 -0
- package/dist/shared.d.ts +35 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +68 -0
- package/dist/shared.js.map +1 -0
- package/dist/tools.d.ts +106 -19
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +124 -117
- package/dist/tools.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/llms.txt +24 -2
- package/package.json +8 -3
package/dist/tools.d.ts
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GBLIN MCP — Tool Implementations
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Focused tools. Each returns structured JSON the LLM can parse:
|
|
5
5
|
*
|
|
6
6
|
* 1. get_treasury_state → NAV, basket, Crash Shield (snapshot)
|
|
7
7
|
* 2. quote_safe_swap → preview a buy/sell with safe minOut
|
|
8
8
|
* 3. swap_gblin_to_usdc_jit → calldata for Just-In-Time x402 payment
|
|
9
9
|
* 4. invest_usdc_to_gblin → calldata to convert USDC earnings → GBLIN
|
|
10
|
-
* 5. analyze_treasury_health → balances
|
|
10
|
+
* 5. analyze_treasury_health → balances, gas check against the live price, runway, allocation
|
|
11
11
|
* 6. get_governance_state → verify 48h timelock ownership + pending ops
|
|
12
|
-
* 7. share_skill_with_peer → portable JSON skill seed
|
|
12
|
+
* 7. share_skill_with_peer → portable JSON skill seed for a peer agent
|
|
13
13
|
* 8. get_auction_state → the rebalancing auction: side, gap and premium per row, with the bid
|
|
14
|
-
* 9. get_market_risk_regime → on-chain BTC/ETH risk regime signal
|
|
15
|
-
* 10. verify_risk_attestation → verify a perishable Risk Attestation
|
|
14
|
+
* 9. get_market_risk_regime → on-chain BTC/ETH risk regime signal
|
|
15
|
+
* 10. verify_risk_attestation → verify a perishable Risk Attestation
|
|
16
|
+
*
|
|
17
|
+
* The payment tools live in payments.ts, prepare/preview/status/history in actions.ts, the receipt
|
|
18
|
+
* tools in receipts.ts. Every tool is free by default; see paywall.ts for the metering switch.
|
|
16
19
|
*/
|
|
17
|
-
|
|
18
|
-
content: {
|
|
19
|
-
type: "text";
|
|
20
|
-
text: string;
|
|
21
|
-
}[];
|
|
22
|
-
};
|
|
23
|
-
declare function toolError(message: string, hint?: string): {
|
|
24
|
-
isError: boolean;
|
|
25
|
-
content: {
|
|
26
|
-
type: "text";
|
|
27
|
-
text: string;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
20
|
+
import { toolError, toolResult } from "./shared.js";
|
|
30
21
|
export declare const GET_TREASURY_STATE_DEFINITION: {
|
|
31
22
|
name: string;
|
|
32
23
|
description: string;
|
|
@@ -37,6 +28,13 @@ export declare const GET_TREASURY_STATE_DEFINITION: {
|
|
|
37
28
|
};
|
|
38
29
|
};
|
|
39
30
|
export declare function handleGetTreasuryState(): Promise<{
|
|
31
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
32
|
+
content: {
|
|
33
|
+
type: "text";
|
|
34
|
+
text: string;
|
|
35
|
+
}[];
|
|
36
|
+
} | {
|
|
37
|
+
isError: boolean;
|
|
40
38
|
content: {
|
|
41
39
|
type: "text";
|
|
42
40
|
text: string;
|
|
@@ -62,6 +60,13 @@ export declare const QUOTE_SAFE_SWAP_DEFINITION: {
|
|
|
62
60
|
};
|
|
63
61
|
};
|
|
64
62
|
export declare function handleQuoteSafeSwap(args: unknown): Promise<{
|
|
63
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
64
|
+
content: {
|
|
65
|
+
type: "text";
|
|
66
|
+
text: string;
|
|
67
|
+
}[];
|
|
68
|
+
} | {
|
|
69
|
+
isError: boolean;
|
|
65
70
|
content: {
|
|
66
71
|
type: "text";
|
|
67
72
|
text: string;
|
|
@@ -87,6 +92,13 @@ export declare const JIT_SWAP_DEFINITION: {
|
|
|
87
92
|
};
|
|
88
93
|
};
|
|
89
94
|
export declare function handleJitSwap(args: unknown): Promise<{
|
|
95
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
96
|
+
content: {
|
|
97
|
+
type: "text";
|
|
98
|
+
text: string;
|
|
99
|
+
}[];
|
|
100
|
+
} | {
|
|
101
|
+
isError: boolean;
|
|
90
102
|
content: {
|
|
91
103
|
type: "text";
|
|
92
104
|
text: string;
|
|
@@ -112,6 +124,13 @@ export declare const INVEST_DEFINITION: {
|
|
|
112
124
|
};
|
|
113
125
|
};
|
|
114
126
|
export declare function handleInvest(args: unknown): Promise<{
|
|
127
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
128
|
+
content: {
|
|
129
|
+
type: "text";
|
|
130
|
+
text: string;
|
|
131
|
+
}[];
|
|
132
|
+
} | {
|
|
133
|
+
isError: boolean;
|
|
115
134
|
content: {
|
|
116
135
|
type: "text";
|
|
117
136
|
text: string;
|
|
@@ -141,6 +160,13 @@ export declare const ANALYZE_TREASURY_DEFINITION: {
|
|
|
141
160
|
};
|
|
142
161
|
};
|
|
143
162
|
export declare function handleAnalyzeTreasury(args: unknown): Promise<{
|
|
163
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
164
|
+
content: {
|
|
165
|
+
type: "text";
|
|
166
|
+
text: string;
|
|
167
|
+
}[];
|
|
168
|
+
} | {
|
|
169
|
+
isError: boolean;
|
|
144
170
|
content: {
|
|
145
171
|
type: "text";
|
|
146
172
|
text: string;
|
|
@@ -161,6 +187,13 @@ export declare const GET_GOVERNANCE_STATE_DEFINITION: {
|
|
|
161
187
|
};
|
|
162
188
|
};
|
|
163
189
|
export declare function handleGetGovernanceState(args: unknown): Promise<{
|
|
190
|
+
structuredContent?: Record<string, unknown> | undefined;
|
|
191
|
+
content: {
|
|
192
|
+
type: "text";
|
|
193
|
+
text: string;
|
|
194
|
+
}[];
|
|
195
|
+
} | {
|
|
196
|
+
isError: boolean;
|
|
164
197
|
content: {
|
|
165
198
|
type: "text";
|
|
166
199
|
text: string;
|
|
@@ -203,6 +236,57 @@ export declare const VERIFY_ATTESTATION_DEFINITION: {
|
|
|
203
236
|
};
|
|
204
237
|
export declare const TOOL_DEFINITIONS: ({
|
|
205
238
|
annotations: {
|
|
239
|
+
title: string;
|
|
240
|
+
readOnlyHint: boolean;
|
|
241
|
+
idempotentHint: boolean;
|
|
242
|
+
destructiveHint: boolean;
|
|
243
|
+
openWorldHint: boolean;
|
|
244
|
+
};
|
|
245
|
+
name: string;
|
|
246
|
+
description: string;
|
|
247
|
+
inputSchema: {
|
|
248
|
+
type: "object";
|
|
249
|
+
properties: {};
|
|
250
|
+
additionalProperties: boolean;
|
|
251
|
+
};
|
|
252
|
+
} | {
|
|
253
|
+
annotations: {
|
|
254
|
+
title: string;
|
|
255
|
+
readOnlyHint: boolean;
|
|
256
|
+
idempotentHint: boolean;
|
|
257
|
+
destructiveHint: boolean;
|
|
258
|
+
openWorldHint: boolean;
|
|
259
|
+
};
|
|
260
|
+
name: string;
|
|
261
|
+
description: string;
|
|
262
|
+
inputSchema: {
|
|
263
|
+
type: string;
|
|
264
|
+
properties: {
|
|
265
|
+
caller_wallet: {
|
|
266
|
+
type: string;
|
|
267
|
+
description: string;
|
|
268
|
+
pattern: string;
|
|
269
|
+
};
|
|
270
|
+
peer_context: {
|
|
271
|
+
type: string;
|
|
272
|
+
description: string;
|
|
273
|
+
};
|
|
274
|
+
example_amount_usdc: {
|
|
275
|
+
type: string;
|
|
276
|
+
description: string;
|
|
277
|
+
minimum: number;
|
|
278
|
+
maximum: number;
|
|
279
|
+
default: number;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
required: string[];
|
|
283
|
+
};
|
|
284
|
+
} | {
|
|
285
|
+
outputSchema: {
|
|
286
|
+
[x: string]: unknown;
|
|
287
|
+
} | undefined;
|
|
288
|
+
annotations: {
|
|
289
|
+
title: string;
|
|
206
290
|
readOnlyHint: boolean;
|
|
207
291
|
idempotentHint: boolean;
|
|
208
292
|
destructiveHint: boolean;
|
|
@@ -216,7 +300,11 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
216
300
|
additionalProperties: boolean;
|
|
217
301
|
};
|
|
218
302
|
} | {
|
|
303
|
+
outputSchema: {
|
|
304
|
+
[x: string]: unknown;
|
|
305
|
+
} | undefined;
|
|
219
306
|
annotations: {
|
|
307
|
+
title: string;
|
|
220
308
|
readOnlyHint: boolean;
|
|
221
309
|
idempotentHint: boolean;
|
|
222
310
|
destructiveHint: boolean;
|
|
@@ -248,5 +336,4 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
248
336
|
};
|
|
249
337
|
})[];
|
|
250
338
|
export declare const TOOL_HANDLERS: Record<string, (args: unknown) => Promise<unknown>>;
|
|
251
|
-
export {};
|
|
252
339
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkDH,OAAO,EAAkE,SAAS,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAqCrI,eAAO,MAAM,6BAA6B;;;;;;;;CASzC,CAAC;AAEF,wBAAsB,sBAAsB;;;;;;;;;;;;GAsC3C;AAaD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;CAgBtC,CAAC;AAEF,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;GAiEtD;AAeD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEF,wBAAsB,aAAa,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;GAuHhD;AAWD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;CAmB7B,CAAC;AAEF,wBAAsB,YAAY,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;GAwF/C;AAeD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;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