@ingenx-io/valets-schema-mcp-server 0.2.3 → 0.2.5
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/README.md +26 -0
- package/data/docs/collections/firestore-paths.md +32 -20
- package/data/docs/enums/app-status.md +24 -0
- package/data/docs/enums/attention-status.md +2 -2
- package/data/docs/enums/booking-status.md +2 -2
- package/data/docs/enums/customer-payment-status.md +2 -2
- package/data/docs/enums/customer-payment-target-type.md +2 -2
- package/data/docs/enums/delivery-type.md +2 -2
- package/data/docs/enums/deployment-link-type.md +2 -2
- package/data/docs/enums/event-status.md +2 -2
- package/data/docs/enums/fulfillment-status.md +2 -2
- package/data/docs/enums/loyalty-transaction-type.md +2 -2
- package/data/docs/enums/notification-channel.md +2 -2
- package/data/docs/enums/notification-entity-type.md +2 -2
- package/data/docs/enums/notification-status.md +2 -2
- package/data/docs/enums/order-status.md +2 -2
- package/data/docs/enums/outbound-message-format.md +2 -2
- package/data/docs/enums/outbound-message-purpose.md +2 -2
- package/data/docs/enums/outbound-message-status.md +2 -2
- package/data/docs/enums/payment-method.md +2 -2
- package/data/docs/enums/payment-proof-status.md +2 -2
- package/data/docs/enums/payment-status.md +2 -2
- package/data/docs/enums/pending-issue.md +2 -2
- package/data/docs/enums/return-status.md +2 -2
- package/data/docs/enums/session-status.md +2 -2
- package/data/docs/enums/site-status.md +2 -2
- package/data/docs/enums/stocktake-frequency.md +2 -2
- package/data/docs/enums/stocktake-item-status.md +2 -2
- package/data/docs/enums/stocktake-status.md +2 -2
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/enums/waba-label.md +2 -2
- package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
- package/data/docs/enums/whatsapp-template-component.md +2 -2
- package/data/docs/enums/whatsapp-template-status.md +2 -2
- package/data/docs/index.md +9 -5
- package/data/docs/models/allowed-user.md +7 -7
- package/data/docs/models/analytics-backfill.md +7 -7
- package/data/docs/models/analytics-daily.md +6 -6
- package/data/docs/models/analytics-event.md +7 -7
- package/data/docs/models/analytics-hourly.md +6 -6
- package/data/docs/models/app-payment.md +200 -0
- package/data/docs/models/app.md +561 -0
- package/data/docs/models/booking-version.md +2 -2
- package/data/docs/models/booking.md +127 -127
- package/data/docs/models/customer-payment-allocation.md +20 -20
- package/data/docs/models/customer-payment.md +23 -23
- package/data/docs/models/customer.md +11 -11
- package/data/docs/models/event.md +22 -22
- package/data/docs/models/loyalty-config.md +4 -4
- package/data/docs/models/loyalty-reward.md +3 -3
- package/data/docs/models/loyalty-status.md +6 -6
- package/data/docs/models/loyalty-transaction.md +2 -2
- package/data/docs/models/magic-link-request.md +9 -9
- package/data/docs/models/metrics-current.md +169 -37
- package/data/docs/models/metrics-daily.md +172 -40
- package/data/docs/models/metrics-monthly.md +172 -40
- package/data/docs/models/notification-record.md +3 -3
- package/data/docs/models/order-item.md +6 -6
- package/data/docs/models/order.md +78 -78
- package/data/docs/models/sale.md +18 -18
- package/data/docs/models/site-payment.md +2 -2
- package/data/docs/models/site.md +2 -2
- package/data/docs/models/stocktake-item.md +4 -4
- package/data/docs/models/stocktake.md +5 -5
- package/data/docs/models/ticket.md +3 -3
- package/data/docs/models/user.md +249 -0
- package/data/docs/models/whatsapp-inbound-message.md +2 -2
- package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
- package/data/docs/models/whatsapp-outbound-message.md +6 -6
- package/data/docs/models/whatsapp-template.md +2 -2
- package/data/static/cookbook.json +150 -0
- package/data/static/llms.txt +179 -33
- package/data/static/openapi.yaml +626 -60
- package/data/static/schemas.json +680 -69
- package/index.js +32 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* - list_decisions → all data model decisions with status
|
|
20
20
|
* - get_decision → single decision detail
|
|
21
21
|
* - get_openapi → OpenAPI 3.1 spec (full or single component)
|
|
22
|
+
* - get_guidance → use-case recipes (call sequences, field cheatsheets, workaround notes)
|
|
22
23
|
*
|
|
23
24
|
* Resources:
|
|
24
25
|
* - valets://schemas.json → full schema bundle
|
|
@@ -103,6 +104,11 @@ async function loadOpenapi() {
|
|
|
103
104
|
return fetchOrRead("/openapi.yaml", join(BUNDLED_STATIC, "openapi.yaml"));
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
async function loadCookbook() {
|
|
108
|
+
const raw = await fetchOrRead("/cookbook.json", join(BUNDLED_STATIC, "cookbook.json"));
|
|
109
|
+
return JSON.parse(raw);
|
|
110
|
+
}
|
|
111
|
+
|
|
106
112
|
// ---------------------------------------------------------------------------
|
|
107
113
|
// Doc page loading (Markdown)
|
|
108
114
|
// ---------------------------------------------------------------------------
|
|
@@ -319,6 +325,32 @@ server.tool(
|
|
|
319
325
|
}
|
|
320
326
|
);
|
|
321
327
|
|
|
328
|
+
server.tool(
|
|
329
|
+
"get_guidance",
|
|
330
|
+
"Get use-case recipes showing which MCP tools to call and in what order. Call with no arguments for an index of all recipes, or pass a slug to get the full recipe detail.",
|
|
331
|
+
{ slug: z.string().optional().describe("Recipe slug (e.g. 'write-model-code', 'field-history', 'whatsapp-conversation-display'). Omit to list all recipes.") },
|
|
332
|
+
async ({ slug } = {}) => {
|
|
333
|
+
const cookbook = await loadCookbook();
|
|
334
|
+
if (!slug) {
|
|
335
|
+
const index = cookbook.recipes.map((r) => `- **${r.slug}**: ${r.summary}`).join("\n");
|
|
336
|
+
return {
|
|
337
|
+
content: [{ type: "text", text: `Available recipes (${cookbook.recipes.length}):\n\n${index}\n\nCall get_guidance with a slug to get the full recipe.` }],
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
const recipe = cookbook.recipes.find((r) => r.slug === slug);
|
|
341
|
+
if (!recipe) {
|
|
342
|
+
const available = cookbook.recipes.map((r) => r.slug);
|
|
343
|
+
return {
|
|
344
|
+
content: [{ type: "text", text: `Recipe "${slug}" not found.\n\nAvailable slugs:\n${available.map((s) => ` - ${s}`).join("\n")}` }],
|
|
345
|
+
isError: true,
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
content: [{ type: "text", text: JSON.stringify(recipe, null, 2) }],
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
|
|
322
354
|
// ---------------------------------------------------------------------------
|
|
323
355
|
// Resources
|
|
324
356
|
// ---------------------------------------------------------------------------
|