slab-mcp 0.1.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.
Files changed (56) hide show
  1. package/README.md +264 -0
  2. package/dist/client.d.ts +26 -0
  3. package/dist/client.js +100 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/config.d.ts +21 -0
  6. package/dist/config.js +34 -0
  7. package/dist/config.js.map +1 -0
  8. package/dist/context.d.ts +20 -0
  9. package/dist/context.js +39 -0
  10. package/dist/context.js.map +1 -0
  11. package/dist/errors.d.ts +38 -0
  12. package/dist/errors.js +76 -0
  13. package/dist/errors.js.map +1 -0
  14. package/dist/format.d.ts +64 -0
  15. package/dist/format.js +125 -0
  16. package/dist/format.js.map +1 -0
  17. package/dist/index.d.ts +15 -0
  18. package/dist/index.js +52 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/prompts/index.d.ts +23 -0
  21. package/dist/prompts/index.js +104 -0
  22. package/dist/prompts/index.js.map +1 -0
  23. package/dist/resources/index.d.ts +25 -0
  24. package/dist/resources/index.js +60 -0
  25. package/dist/resources/index.js.map +1 -0
  26. package/dist/tools/catalog.d.ts +93 -0
  27. package/dist/tools/catalog.js +103 -0
  28. package/dist/tools/catalog.js.map +1 -0
  29. package/dist/tools/collection.d.ts +87 -0
  30. package/dist/tools/collection.js +130 -0
  31. package/dist/tools/collection.js.map +1 -0
  32. package/dist/tools/community.d.ts +10 -0
  33. package/dist/tools/community.js +74 -0
  34. package/dist/tools/community.js.map +1 -0
  35. package/dist/tools/filters.d.ts +51 -0
  36. package/dist/tools/filters.js +54 -0
  37. package/dist/tools/filters.js.map +1 -0
  38. package/dist/tools/index.d.ts +22 -0
  39. package/dist/tools/index.js +55 -0
  40. package/dist/tools/index.js.map +1 -0
  41. package/dist/tools/meta.d.ts +33 -0
  42. package/dist/tools/meta.js +98 -0
  43. package/dist/tools/meta.js.map +1 -0
  44. package/dist/tools/pricing.d.ts +30 -0
  45. package/dist/tools/pricing.js +90 -0
  46. package/dist/tools/pricing.js.map +1 -0
  47. package/dist/tools/types.d.ts +69 -0
  48. package/dist/tools/types.js +50 -0
  49. package/dist/tools/types.js.map +1 -0
  50. package/dist/tools/writes.d.ts +128 -0
  51. package/dist/tools/writes.js +168 -0
  52. package/dist/tools/writes.js.map +1 -0
  53. package/dist/types.d.ts +80 -0
  54. package/dist/types.js +11 -0
  55. package/dist/types.js.map +1 -0
  56. package/package.json +53 -0
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Result formatting.
3
+ *
4
+ * The constraint that shapes every tool in this server: a tool result is spent
5
+ * out of the calling model's context window. A raw `POST /cards/search` page
6
+ * is tens of thousands of tokens of JSON, most of it nulls and repeated keys,
7
+ * and an agent that burns its window on one search has nothing left to reason
8
+ * with. So results are rendered as dense lines — one entity per line, UUID
9
+ * first because that is the only field the model must carry to the next call.
10
+ *
11
+ * Note what is deliberately absent: `outputSchema` / `structuredContent`. MCP
12
+ * supports it, but a tool that declares an output schema must return the data
13
+ * BOTH as structured content and as text, which doubles the cost of exactly
14
+ * the payloads that are already the largest thing here. Add it per-tool if a
15
+ * client appears that consumes structured content and skips the text — not
16
+ * before.
17
+ */
18
+ export interface ToolResult {
19
+ content: Array<{
20
+ type: 'text';
21
+ text: string;
22
+ }>;
23
+ isError?: boolean;
24
+ }
25
+ export declare function text(...parts: Array<string | undefined | null | false>): ToolResult;
26
+ /** Money, rendered the way a person reads it. `null` becomes an em dash. */
27
+ export declare function money(value: number | string | null | undefined): string;
28
+ /** A 0-1 ratio as a percentage. `portfolio_roi: 0.0645` reads as `6.45%`. */
29
+ export declare function percent(value: number | string | null | undefined): string;
30
+ /** A count, rendered as an integer with no currency symbol. */
31
+ export declare function count(value: number | string | null | undefined): string;
32
+ /** Render one dashboard/summary metric with the right unit for its name. */
33
+ export declare function metric(key: string, value: unknown): string;
34
+ /** Join non-empty fragments with a separator, dropping blanks. */
35
+ export declare function join(sep: string, ...parts: Array<string | number | null | undefined | false>): string;
36
+ /**
37
+ * The standard header for a paged result. Says how much was returned out of
38
+ * how much exists, so the model knows whether to page rather than assuming it
39
+ * has seen everything — the most common silent failure in agent search loops.
40
+ */
41
+ export declare function pageHeader(label: string, total: number | undefined, shown: number, offset?: number): string;
42
+ export interface MetricInfo {
43
+ label?: string;
44
+ summary?: string;
45
+ detail?: string;
46
+ }
47
+ /**
48
+ * Render an embedded glossary block.
49
+ *
50
+ * Several slab responses carry the definitions of their own metrics, keyed by
51
+ * namespaced id. Rendering them next to the numbers is the whole point: the
52
+ * agent gets slab's wording for what a figure means, in the same result, so it
53
+ * explains `priced_coverage` correctly instead of inventing a gloss. Dropping
54
+ * this block — which an earlier version of this file did — is how an agent
55
+ * ends up confidently paraphrasing a metric it has never seen defined.
56
+ */
57
+ export declare function glossaryLines(glossary: Record<string, MetricInfo> | null | undefined, opts?: {
58
+ detail?: boolean;
59
+ }): string[];
60
+ /** Render facet buckets compactly: `brand: Upper Deck (412), O-Pee-Chee (88)`. */
61
+ export declare function facetLines(facets: Record<string, Array<{
62
+ value: string;
63
+ count: number;
64
+ }>> | null | undefined): string[];
package/dist/format.js ADDED
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Result formatting.
3
+ *
4
+ * The constraint that shapes every tool in this server: a tool result is spent
5
+ * out of the calling model's context window. A raw `POST /cards/search` page
6
+ * is tens of thousands of tokens of JSON, most of it nulls and repeated keys,
7
+ * and an agent that burns its window on one search has nothing left to reason
8
+ * with. So results are rendered as dense lines — one entity per line, UUID
9
+ * first because that is the only field the model must carry to the next call.
10
+ *
11
+ * Note what is deliberately absent: `outputSchema` / `structuredContent`. MCP
12
+ * supports it, but a tool that declares an output schema must return the data
13
+ * BOTH as structured content and as text, which doubles the cost of exactly
14
+ * the payloads that are already the largest thing here. Add it per-tool if a
15
+ * client appears that consumes structured content and skips the text — not
16
+ * before.
17
+ */
18
+ export function text(...parts) {
19
+ return {
20
+ content: [{ type: 'text', text: parts.filter(Boolean).join('\n').trim() || '(no results)' }],
21
+ };
22
+ }
23
+ /** Money, rendered the way a person reads it. `null` becomes an em dash. */
24
+ export function money(value) {
25
+ if (value === null || value === undefined || value === '')
26
+ return '—';
27
+ const n = typeof value === 'string' ? Number(value) : value;
28
+ if (!Number.isFinite(n))
29
+ return '—';
30
+ return `$${n.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
31
+ }
32
+ /** A 0-1 ratio as a percentage. `portfolio_roi: 0.0645` reads as `6.45%`. */
33
+ export function percent(value) {
34
+ if (value === null || value === undefined || value === '')
35
+ return '—';
36
+ const n = typeof value === 'string' ? Number(value) : value;
37
+ if (!Number.isFinite(n))
38
+ return '—';
39
+ return `${(n * 100).toFixed(2)}%`;
40
+ }
41
+ /** A count, rendered as an integer with no currency symbol. */
42
+ export function count(value) {
43
+ if (value === null || value === undefined || value === '')
44
+ return '—';
45
+ const n = typeof value === 'string' ? Number(value) : value;
46
+ if (!Number.isFinite(n))
47
+ return '—';
48
+ return n.toLocaleString('en-US', { maximumFractionDigits: 0 });
49
+ }
50
+ // Metric formatting is keyed on the FIELD NAME, never on the value's runtime
51
+ // type. Two reasons, both found by running this against a real collection:
52
+ // slab serializes Decimal as a JSON string, so a `typeof v === 'number'` test
53
+ // silently let `total_cost_basis` through as "775.5800000000000000000000000";
54
+ // and `priced_copies` is an integer count that a type-based rule happily
55
+ // rendered as "$159.00". A number labelled with the wrong unit is worse than
56
+ // an unformatted one — so anything unrecognised falls through to plain text
57
+ // rather than being guessed into a currency.
58
+ const COUNT_KEYS = /^(total|total_cards|players|teams|breaks|lots|rookies|autos|relics|numbered|one_of_ones|priced_copies|unpriced_copies|sample_size|.*_count)$/;
59
+ const RATIO_KEYS = /(roi|coverage)$/;
60
+ const MONEY_KEYS = /(cost|basis|value|gain|loss|price|fmv|change_\d+d)/;
61
+ /** Render one dashboard/summary metric with the right unit for its name. */
62
+ export function metric(key, value) {
63
+ if (value === null || value === undefined)
64
+ return '—';
65
+ if (typeof value === 'boolean' || typeof value === 'object')
66
+ return String(value);
67
+ if (COUNT_KEYS.test(key))
68
+ return count(value);
69
+ if (RATIO_KEYS.test(key))
70
+ return percent(value);
71
+ if (MONEY_KEYS.test(key))
72
+ return money(value);
73
+ return String(value);
74
+ }
75
+ /** Join non-empty fragments with a separator, dropping blanks. */
76
+ export function join(sep, ...parts) {
77
+ return parts.filter((p) => p !== null && p !== undefined && p !== false && p !== '').join(sep);
78
+ }
79
+ /**
80
+ * The standard header for a paged result. Says how much was returned out of
81
+ * how much exists, so the model knows whether to page rather than assuming it
82
+ * has seen everything — the most common silent failure in agent search loops.
83
+ */
84
+ export function pageHeader(label, total, shown, offset = 0) {
85
+ if (total === undefined)
86
+ return `${shown} ${label}`;
87
+ const end = offset + shown;
88
+ if (end >= total && offset === 0)
89
+ return `${total} ${label}`;
90
+ return `${label}: showing ${offset + 1}-${end} of ${total} (raise \`offset\` to page)`;
91
+ }
92
+ /**
93
+ * Render an embedded glossary block.
94
+ *
95
+ * Several slab responses carry the definitions of their own metrics, keyed by
96
+ * namespaced id. Rendering them next to the numbers is the whole point: the
97
+ * agent gets slab's wording for what a figure means, in the same result, so it
98
+ * explains `priced_coverage` correctly instead of inventing a gloss. Dropping
99
+ * this block — which an earlier version of this file did — is how an agent
100
+ * ends up confidently paraphrasing a metric it has never seen defined.
101
+ */
102
+ export function glossaryLines(glossary, opts = {}) {
103
+ if (!glossary || !Object.keys(glossary).length)
104
+ return [];
105
+ const out = ['', 'What these mean (slab\'s own wording — use it rather than paraphrasing):'];
106
+ for (const [id, info] of Object.entries(glossary)) {
107
+ out.push(` ${id} — ${info.label ?? id}: ${info.summary ?? ''}`);
108
+ if (opts.detail && info.detail)
109
+ out.push(` ${info.detail}`);
110
+ }
111
+ return out;
112
+ }
113
+ /** Render facet buckets compactly: `brand: Upper Deck (412), O-Pee-Chee (88)`. */
114
+ export function facetLines(facets) {
115
+ if (!facets)
116
+ return [];
117
+ const out = [];
118
+ for (const [dimension, buckets] of Object.entries(facets)) {
119
+ if (!buckets?.length)
120
+ continue;
121
+ out.push(` ${dimension}: ${buckets.map((b) => `${b.value} (${b.count})`).join(', ')}`);
122
+ }
123
+ return out.length ? ['', 'Facets:', ...out] : [];
124
+ }
125
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,MAAM,UAAU,IAAI,CAAC,GAAG,KAA+C;IACrE,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,cAAc,EAAE,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,KAAK,CAAC,KAAyC;IAC7D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC;IACtE,MAAM,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IACpC,OAAO,IAAI,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,qBAAqB,EAAE,CAAC,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACjG,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,KAAyC;IAC/D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC;IACtE,MAAM,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,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— including one
7
+ * from a dependency — corrupts the stream and the client drops the connection
8
+ * with an error that points nowhere near the real cause. So: all diagnostics
9
+ * go to stderr, which hosts surface as the server's log.
10
+ *
11
+ * This file wires things together and does nothing else. Tools, resources, and
12
+ * prompts each own their own registration; adding any of them never touches
13
+ * this file.
14
+ */
15
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Entry point.
4
+ *
5
+ * THE ONE RULE OF A STDIO MCP SERVER: stdout belongs to the protocol. Every
6
+ * byte written there must be JSON-RPC. A stray console.log — including one
7
+ * from a dependency — corrupts the stream and the client drops the connection
8
+ * with an error that points nowhere near the real cause. So: all diagnostics
9
+ * go to stderr, which hosts surface as the server's log.
10
+ *
11
+ * This file wires things together and does nothing else. Tools, resources, and
12
+ * prompts each own their own registration; adding any of them never touches
13
+ * this file.
14
+ */
15
+ import { McpServer } from '@modelcontextprotocol/server';
16
+ import { serveStdio } from '@modelcontextprotocol/server/stdio';
17
+ import { loadConfig } from './config.js';
18
+ import { createContext } from './context.js';
19
+ import { ConfigError } from './errors.js';
20
+ import { registerPrompts } from './prompts/index.js';
21
+ import { registerResources } from './resources/index.js';
22
+ import { registerTools } from './tools/index.js';
23
+ const VERSION = '0.1.0';
24
+ /** stderr only — see the note above. */
25
+ function log(message) {
26
+ process.stderr.write(`[slab-mcp] ${message}\n`);
27
+ }
28
+ function main() {
29
+ let config;
30
+ try {
31
+ config = loadConfig();
32
+ }
33
+ catch (err) {
34
+ if (err instanceof ConfigError) {
35
+ log(err.message);
36
+ process.exit(1);
37
+ }
38
+ throw err;
39
+ }
40
+ const ctx = createContext(config);
41
+ serveStdio(() => {
42
+ const server = new McpServer({ name: 'slab', version: VERSION }, { capabilities: { tools: {}, resources: {}, prompts: {} } });
43
+ const active = registerTools(server, ctx);
44
+ registerResources(server, ctx);
45
+ registerPrompts(server);
46
+ log(`serving ${active.length} tools against ${config.apiUrl} ` +
47
+ `(writes ${config.writesEnabled ? 'ENABLED' : 'disabled'})`);
48
+ return server;
49
+ }, { onerror: (error) => log(`transport error: ${error.message}`) });
50
+ }
51
+ main();
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB,wCAAwC;AACxC,SAAS,GAAG,CAAC,OAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,OAAO,IAAI,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,IAAI;IACX,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,UAAU,EAAE,CAAC;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,WAAW,EAAE,CAAC;YAC/B,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAElC,UAAU,CACR,GAAG,EAAE;QACH,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAClC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAC5D,CAAC;QACF,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1C,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,eAAe,CAAC,MAAM,CAAC,CAAC;QACxB,GAAG,CACD,WAAW,MAAM,CAAC,MAAM,kBAAkB,MAAM,CAAC,MAAM,GAAG;YACxD,WAAW,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,GAAG,CAC9D,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAAE,OAAO,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,GAAG,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CACxE,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Prompts — user-invoked workflows, surfaced in the host's slash menu.
3
+ *
4
+ * The distinction that matters: a tool is something the MODEL decides to call;
5
+ * a prompt is something the USER picks. So these are not instructions to the
6
+ * model about how to behave — they are starting points a person chooses, each
7
+ * one encoding the sequence of tool calls that a question actually requires,
8
+ * plus the caveats that stop a confident wrong answer.
9
+ *
10
+ * Adding a prompt: one entry in PROMPTS.
11
+ */
12
+ import type { McpServer } from '@modelcontextprotocol/server';
13
+ import { z } from 'zod';
14
+ interface PromptModule {
15
+ name: string;
16
+ title: string;
17
+ description: string;
18
+ argsSchema: z.ZodType;
19
+ render(args: Record<string, string | undefined>): string;
20
+ }
21
+ export declare const PROMPTS: PromptModule[];
22
+ export declare function registerPrompts(server: McpServer): void;
23
+ export {};
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Prompts — user-invoked workflows, surfaced in the host's slash menu.
3
+ *
4
+ * The distinction that matters: a tool is something the MODEL decides to call;
5
+ * a prompt is something the USER picks. So these are not instructions to the
6
+ * model about how to behave — they are starting points a person chooses, each
7
+ * one encoding the sequence of tool calls that a question actually requires,
8
+ * plus the caveats that stop a confident wrong answer.
9
+ *
10
+ * Adding a prompt: one entry in PROMPTS.
11
+ */
12
+ import { z } from 'zod';
13
+ export const PROMPTS = [
14
+ {
15
+ name: 'appraise-collection',
16
+ title: 'Appraise my collection',
17
+ description: 'Summarise what the collection is worth, what it cost, and where the value is concentrated.',
18
+ argsSchema: z.object({
19
+ focus: z.string().optional().describe('Optional narrowing, e.g. "rookies", "graded only", "2024-25".'),
20
+ }),
21
+ render: (args) => [
22
+ 'Appraise my card collection.',
23
+ args.focus ? `Focus on: ${args.focus}.` : '',
24
+ '',
25
+ 'Use get_dashboard for the headline numbers, then search_collection to find where the value',
26
+ 'sits. Report: total cost basis, current market value, unrealised gain/loss, and the handful',
27
+ 'of copies driving most of the value.',
28
+ '',
29
+ 'Constraints on how you report it:',
30
+ '- Call explain_metrics and use slab\'s own wording for every figure you quote. Do not',
31
+ ' paraphrase what cost basis, ROI, or priced coverage mean.',
32
+ '- Unrealised gain is paper, not money made. Say so.',
33
+ '- Do not describe the portfolio series as performance. It steps up when I buy a card, so',
34
+ ' differencing it mixes purchases with price movement. Use portfolio_change_7d for drift.',
35
+ '- Flag any value resting on a small sample size instead of quoting it flat.',
36
+ ]
37
+ .filter(Boolean)
38
+ .join('\n'),
39
+ },
40
+ {
41
+ name: 'research-player',
42
+ title: 'Research a player',
43
+ description: "Survey a player's cards — what exists, what is scarce, and what the market is doing.",
44
+ argsSchema: z.object({
45
+ player: z.string().describe('Player name, e.g. "Connor Bedard".'),
46
+ budget: z.string().optional().describe('Optional budget ceiling, e.g. "$200".'),
47
+ }),
48
+ render: (args) => [
49
+ `Research ${args.player}'s trading cards.`,
50
+ args.budget ? `I am working with a budget of about ${args.budget}.` : '',
51
+ '',
52
+ 'Start with search_cards filtered by subject, using facets to see how the cards break down by',
53
+ 'year, set, and finish rather than paging through every parallel. Then use get_card_pricing on',
54
+ 'the handful worth a closer look.',
55
+ '',
56
+ 'Tell me: what the notable cards are, which are genuinely scarce (print run, not vibes), and',
57
+ 'what recent sales actually show. When you talk about movement, count real sales from the comps',
58
+ 'in the window — do not quote the 30-day appraisal drift as a market move.',
59
+ args.budget ? 'End with what you would actually buy at my budget, and why.' : '',
60
+ ]
61
+ .filter(Boolean)
62
+ .join('\n'),
63
+ },
64
+ {
65
+ name: 'grading-decision',
66
+ title: 'Should I grade this card?',
67
+ description: 'Weigh the cost of grading a card against the uplift it would need to pay for itself.',
68
+ argsSchema: z.object({
69
+ card: z.string().describe('Which card — a name, or a copy uuid from search_collection.'),
70
+ grading_cost: z.string().optional().describe('What grading would cost, e.g. "$25".'),
71
+ }),
72
+ render: (args) => [
73
+ `Help me decide whether to grade: ${args.card}.`,
74
+ args.grading_cost ? `Grading would cost about ${args.grading_cost}.` : '',
75
+ '',
76
+ 'Find the card, then use get_card_pricing to compare the raw value against the graded values at',
77
+ 'each grade key. The gap is the grading uplift, and it only pays if it exceeds the grading cost',
78
+ 'at a grade the card would realistically receive.',
79
+ '',
80
+ 'Be honest about the uncertainty: I do not know what grade it would get, and the graded value',
81
+ 'may rest on very few sales. Give me the break-even grade rather than a single recommendation,',
82
+ 'and say plainly if the sample is too thin to call.',
83
+ ]
84
+ .filter(Boolean)
85
+ .join('\n'),
86
+ },
87
+ ];
88
+ export function registerPrompts(server) {
89
+ for (const prompt of PROMPTS) {
90
+ server.registerPrompt(prompt.name, {
91
+ title: prompt.title,
92
+ description: prompt.description,
93
+ argsSchema: prompt.argsSchema,
94
+ }, ((args) => ({
95
+ messages: [
96
+ {
97
+ role: 'user',
98
+ content: { type: 'text', text: prompt.render(args ?? {}) },
99
+ },
100
+ ],
101
+ })));
102
+ }
103
+ }
104
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
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U,EAAE,MAAM,CAAC,UAAmB;SACvC,EACD,CAAC,CAAC,IAAwC,EAAE,EAAE,CAAC,CAAC;YAC9C,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAe;oBACrB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE;iBACpE;aACF;SACF,CAAC,CAAU,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Resources — context a model can pull without spending a tool call.
3
+ *
4
+ * All three are documents the slab API already publishes as the authoritative
5
+ * version of themselves. Exposing them here rather than restating them is the
6
+ * same rule the slab portal follows for its docs site: never hand-copy a
7
+ * machine-generated surface, because the copy drifts and the generated one
8
+ * can't.
9
+ *
10
+ * Adding a resource: one entry in RESOURCES.
11
+ */
12
+ import type { McpServer } from '@modelcontextprotocol/server';
13
+ import type { ToolContext } from '../context.js';
14
+ interface ResourceModule {
15
+ name: string;
16
+ uri: string;
17
+ title: string;
18
+ description: string;
19
+ mimeType: string;
20
+ /** Path on the slab API whose body is served verbatim. */
21
+ path: string;
22
+ }
23
+ export declare const RESOURCES: ResourceModule[];
24
+ export declare function registerResources(server: McpServer, ctx: ToolContext): void;
25
+ export {};
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Resources — context a model can pull without spending a tool call.
3
+ *
4
+ * All three are documents the slab API already publishes as the authoritative
5
+ * version of themselves. Exposing them here rather than restating them is the
6
+ * same rule the slab portal follows for its docs site: never hand-copy a
7
+ * machine-generated surface, because the copy drifts and the generated one
8
+ * can't.
9
+ *
10
+ * Adding a resource: one entry in RESOURCES.
11
+ */
12
+ export const RESOURCES = [
13
+ {
14
+ name: 'vocab',
15
+ uri: 'slab://vocab',
16
+ title: 'Accepted values',
17
+ description: 'Every enumerable value the slab API accepts: wire enums, sort grammars, and the live catalog ' +
18
+ 'dimensions (brands, teams, attributes, finishes, grading companies) that grow as sets are ' +
19
+ 'seeded. Read this instead of assuming a filter value.',
20
+ mimeType: 'application/json',
21
+ path: '/vocab',
22
+ },
23
+ {
24
+ name: 'glossary',
25
+ uri: 'slab://glossary',
26
+ title: 'Metric definitions',
27
+ description: 'Plain-language definition of every metric the slab API returns, keyed by namespaced id. Use ' +
28
+ "slab's wording when explaining a number to a user rather than composing your own.",
29
+ mimeType: 'application/json',
30
+ path: '/glossary',
31
+ },
32
+ {
33
+ name: 'openapi',
34
+ uri: 'slab://openapi',
35
+ title: 'OpenAPI specification',
36
+ description: 'The complete, authoritative slab API contract. This server exposes a curated subset as tools; ' +
37
+ 'read this when you need to know exactly what a field means or what an endpoint returns. Large ' +
38
+ '— fetch it deliberately, not by default.',
39
+ mimeType: 'application/json',
40
+ path: '/openapi.json',
41
+ },
42
+ ];
43
+ export function registerResources(server, ctx) {
44
+ for (const resource of RESOURCES) {
45
+ server.registerResource(resource.name, resource.uri, {
46
+ title: resource.title,
47
+ description: resource.description,
48
+ mimeType: resource.mimeType,
49
+ }, async (uri) => ({
50
+ contents: [
51
+ {
52
+ uri: uri.href,
53
+ mimeType: resource.mimeType,
54
+ text: await ctx.client.raw(resource.path),
55
+ },
56
+ ],
57
+ }));
58
+ }
59
+ }
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH,MAAM,CAAC,MAAM,SAAS,GAAqB;IACzC;QACE,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,cAAc;QACnB,KAAK,EAAE,iBAAiB;QACxB,WAAW,EACT,+FAA+F;YAC/F,4FAA4F;YAC5F,uDAAuD;QACzD,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,QAAQ;KACf;IACD;QACE,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,iBAAiB;QACtB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACT,8FAA8F;YAC9F,mFAAmF;QACrF,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,WAAW;KAClB;IACD;QACE,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACT,gGAAgG;YAChG,gGAAgG;YAChG,0CAA0C;QAC5C,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,eAAe;KACtB;CACF,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,GAAgB;IACnE,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,CAAC,gBAAgB,CACrB,QAAQ,CAAC,IAAI,EACb,QAAQ,CAAC,GAAG,EACZ;YACE,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;SAC5B,EACD,KAAK,EAAE,GAAQ,EAAE,EAAE,CAAC,CAAC;YACnB,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,GAAG,CAAC,IAAI;oBACb,QAAQ,EAAE,QAAQ,CAAC,QAAQ;oBAC3B,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;iBAC1C;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,93 @@
1
+ /** Catalog tools: finding cards, products, and what's in a product. */
2
+ import { z } from 'zod';
3
+ import type { CardOut } from '../types.js';
4
+ /** One card on one line. UUID first — it is the only field the model must carry forward. */
5
+ export declare function cardLine(card: CardOut): string;
6
+ export declare const searchCards: import("./types.js").ToolModule<z.ZodObject<{
7
+ include_market: z.ZodOptional<z.ZodBoolean>;
8
+ owned: z.ZodOptional<z.ZodBoolean>;
9
+ facets: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ sort: z.ZodOptional<z.ZodString>;
11
+ limit: z.ZodOptional<z.ZodNumber>;
12
+ offset: z.ZodOptional<z.ZodNumber>;
13
+ q: z.ZodOptional<z.ZodString>;
14
+ subject: z.ZodOptional<z.ZodString>;
15
+ subject_exact: z.ZodOptional<z.ZodBoolean>;
16
+ card_number: z.ZodOptional<z.ZodString>;
17
+ set_slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ subset: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ year: z.ZodOptional<z.ZodNumber>;
21
+ year_min: z.ZodOptional<z.ZodNumber>;
22
+ year_max: z.ZodOptional<z.ZodNumber>;
23
+ team: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ league: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ attribute: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ attribute_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ attribute_not: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ rookie: z.ZodOptional<z.ZodBoolean>;
29
+ auto: z.ZodOptional<z.ZodBoolean>;
30
+ relic: z.ZodOptional<z.ZodBoolean>;
31
+ finish: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ base_only: z.ZodOptional<z.ZodBoolean>;
33
+ parallel_only: z.ZodOptional<z.ZodBoolean>;
34
+ numbered_min: z.ZodOptional<z.ZodNumber>;
35
+ numbered_max: z.ZodOptional<z.ZodNumber>;
36
+ is_numbered: z.ZodOptional<z.ZodBoolean>;
37
+ is_1of1: z.ZodOptional<z.ZodBoolean>;
38
+ }, z.core.$strip>>;
39
+ export declare const searchSets: import("./types.js").ToolModule<z.ZodObject<{
40
+ limit: z.ZodOptional<z.ZodNumber>;
41
+ offset: z.ZodOptional<z.ZodNumber>;
42
+ q: z.ZodOptional<z.ZodString>;
43
+ brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
+ year: z.ZodOptional<z.ZodNumber>;
45
+ sport: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>>;
47
+ export declare const getSetDetail: import("./types.js").ToolModule<z.ZodObject<{
48
+ set_uuid: z.ZodString;
49
+ top_cards: z.ZodOptional<z.ZodNumber>;
50
+ }, z.core.$strip>>;
51
+ export declare const catalogTools: (import("./types.js").ToolModule<z.ZodObject<{
52
+ include_market: z.ZodOptional<z.ZodBoolean>;
53
+ owned: z.ZodOptional<z.ZodBoolean>;
54
+ facets: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ sort: z.ZodOptional<z.ZodString>;
56
+ limit: z.ZodOptional<z.ZodNumber>;
57
+ offset: z.ZodOptional<z.ZodNumber>;
58
+ q: z.ZodOptional<z.ZodString>;
59
+ subject: z.ZodOptional<z.ZodString>;
60
+ subject_exact: z.ZodOptional<z.ZodBoolean>;
61
+ card_number: z.ZodOptional<z.ZodString>;
62
+ set_slug: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
+ subset: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
+ year: z.ZodOptional<z.ZodNumber>;
66
+ year_min: z.ZodOptional<z.ZodNumber>;
67
+ year_max: z.ZodOptional<z.ZodNumber>;
68
+ team: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ league: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ attribute: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ attribute_all: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ attribute_not: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
+ rookie: z.ZodOptional<z.ZodBoolean>;
74
+ auto: z.ZodOptional<z.ZodBoolean>;
75
+ relic: z.ZodOptional<z.ZodBoolean>;
76
+ finish: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ base_only: z.ZodOptional<z.ZodBoolean>;
78
+ parallel_only: z.ZodOptional<z.ZodBoolean>;
79
+ numbered_min: z.ZodOptional<z.ZodNumber>;
80
+ numbered_max: z.ZodOptional<z.ZodNumber>;
81
+ is_numbered: z.ZodOptional<z.ZodBoolean>;
82
+ is_1of1: z.ZodOptional<z.ZodBoolean>;
83
+ }, z.core.$strip>> | import("./types.js").ToolModule<z.ZodObject<{
84
+ limit: z.ZodOptional<z.ZodNumber>;
85
+ offset: z.ZodOptional<z.ZodNumber>;
86
+ q: z.ZodOptional<z.ZodString>;
87
+ brand: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
+ year: z.ZodOptional<z.ZodNumber>;
89
+ sport: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strip>> | import("./types.js").ToolModule<z.ZodObject<{
91
+ set_uuid: z.ZodString;
92
+ top_cards: z.ZodOptional<z.ZodNumber>;
93
+ }, z.core.$strip>>)[];