@ratio-mcp/docs-server 1.5.0 → 1.5.1
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 +74 -0
- package/dist/index.js +0 -0
- package/dist/schemas/orders.json +4 -4
- package/dist/schemas/products.json +5 -5
- package/dist/schemas/schemas/orders.json +4 -4
- package/dist/schemas/schemas/products.json +5 -5
- package/dist/schemas/schemas/scopes.json +6 -6
- package/dist/schemas/scopes.json +6 -6
- package/dist/tools/validate-code.d.ts.map +1 -1
- package/dist/tools/validate-code.js +0 -4
- package/dist/tools/validate-code.js.map +1 -1
- package/package.json +11 -10
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @ratio-mcp/docs-server
|
|
2
|
+
|
|
3
|
+
> Anti-hallucination reference MCP for the Ratio platform. Ground-truth lookups for scopes, REST endpoints, webhook events, and OAuth flow. Production environment.
|
|
4
|
+
|
|
5
|
+
Not installed directly — included via [`@ratio-mcp/setup`](https://www.npmjs.com/package/@ratio-mcp/setup).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Why it exists
|
|
10
|
+
|
|
11
|
+
Without grounded references, LLMs hallucinate platform details — wrong scope codes, invented endpoints, made-up webhook topics. This server exposes 6 tools that the LLM is **required** to call before answering platform-specific questions.
|
|
12
|
+
|
|
13
|
+
When `lookup_docs` returns `found: false`, the LLM must tell the user the info isn't available — not guess.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Tools (6)
|
|
18
|
+
|
|
19
|
+
| Tool | When the LLM must call it |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `lookup_docs` | **Mandatory fallback.** Any platform question where the LLM isn't 100% sure — unified fuzzy search across all docs. |
|
|
22
|
+
| `get_available_scopes` | Before showing scope options to the developer. Returns all 78 resources × 147 scopes. |
|
|
23
|
+
| `get_api_reference` | Before generating or discussing API calls for a resource. Returns endpoint definitions. |
|
|
24
|
+
| `get_scope_endpoint_map` | Before code generation. Maps scopes → the endpoints they unlock. |
|
|
25
|
+
| `get_webhook_events` | Before answering webhook questions. Returns the full event catalog. |
|
|
26
|
+
| `validate_api_code` | **After generating code, before writing to disk.** Catches hallucinated fields, wrong endpoints, missing required fields. |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Data sources
|
|
31
|
+
|
|
32
|
+
The server bundles local JSON schemas — zero network calls at runtime:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
packages/docs-server/src/schemas/
|
|
36
|
+
├── scopes.json # 147 scopes across 78 resources
|
|
37
|
+
├── orders.json # REST endpoints with full request/response shapes
|
|
38
|
+
├── products.json # Same for products
|
|
39
|
+
├── webhooks.json # Event catalog + HMAC-SHA256 verification + retry policy
|
|
40
|
+
└── oauth.json # OAuth flow reference
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Currently `orders` and `products` have full type schemas. Other resources will be added as the platform exposes them via Swagger.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Environment
|
|
48
|
+
|
|
49
|
+
**Production** — points at `https://gkx.gokwik.co/aes` for any tools that fall back to live API calls (most don't — schemas are local).
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Anti-hallucination contract
|
|
54
|
+
|
|
55
|
+
Both MCP servers (this one and `dev-server`) embed mandatory tool-usage rules in their server instructions, surfaced to the LLM via the MCP handshake:
|
|
56
|
+
|
|
57
|
+
> 1. ALWAYS call `lookup_docs` BEFORE answering questions about scopes, webhooks, APIs, or OAuth.
|
|
58
|
+
> 2. If `lookup_docs` returns `found: false`, tell the user the info is not available — do NOT guess.
|
|
59
|
+
> 3. ALWAYS call `validate_scopes` (dev-server) BEFORE presenting any scope to the developer.
|
|
60
|
+
> 4. ALWAYS call `validate_api_code` AFTER generating Ratio API code, BEFORE writing to disk.
|
|
61
|
+
|
|
62
|
+
These guardrails are the difference between "the LLM mostly works" and "the LLM never invents a platform field name."
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Logging
|
|
67
|
+
|
|
68
|
+
stderr + file (`logs/docs-server.log`). Key log prefixes: `[lookup_docs]`, `[validate_api_code]`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
UNLICENSED — internal to the Ratio platform / GoKwik.
|
package/dist/index.js
CHANGED
|
File without changes
|
package/dist/schemas/orders.json
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"path": "/api/v1/orders",
|
|
48
48
|
"controller_order": 3,
|
|
49
49
|
"handler_name": "createOrder",
|
|
50
|
-
"required_scope": "
|
|
50
|
+
"required_scope": "write_orders",
|
|
51
51
|
"summary": "Create a new order",
|
|
52
52
|
"description": "Create an order in the merchant's store.",
|
|
53
53
|
"request_body": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"path": "/api/v1/orders/:id",
|
|
75
75
|
"controller_order": 4,
|
|
76
76
|
"handler_name": "updateOrder",
|
|
77
|
-
"required_scope": "
|
|
77
|
+
"required_scope": "write_orders",
|
|
78
78
|
"summary": "Update an existing order",
|
|
79
79
|
"description": "Update order fields. Only provided fields are modified.",
|
|
80
80
|
"path_params": [
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"path": "/api/v1/orders/:id/cancel",
|
|
102
102
|
"controller_order": 5,
|
|
103
103
|
"handler_name": "cancelOrder",
|
|
104
|
-
"required_scope": "
|
|
104
|
+
"required_scope": "write_orders",
|
|
105
105
|
"summary": "Cancel an existing order",
|
|
106
106
|
"description": "Cancel an existing order with optional reason and restock settings.",
|
|
107
107
|
"path_params": [
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"path": "/api/v1/orders/:id/external-id",
|
|
124
124
|
"controller_order": 6,
|
|
125
125
|
"handler_name": "updateOrderExternalId",
|
|
126
|
-
"required_scope": "
|
|
126
|
+
"required_scope": "write_orders",
|
|
127
127
|
"summary": "Update external ID for an order",
|
|
128
128
|
"description": "Updates the external_order_id field for a single order. Useful for syncing with external systems.",
|
|
129
129
|
"path_params": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"endpoints": [
|
|
10
10
|
{
|
|
11
11
|
"method": "GET",
|
|
12
|
-
"path": "/api/v1/
|
|
12
|
+
"path": "/api/v1/products",
|
|
13
13
|
"controller_order": 1,
|
|
14
14
|
"handler_name": "getProducts",
|
|
15
15
|
"required_scope": "read_products",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"method": "GET",
|
|
38
|
-
"path": "/api/v1/
|
|
38
|
+
"path": "/api/v1/products/:id",
|
|
39
39
|
"controller_order": 2,
|
|
40
40
|
"handler_name": "getProductById",
|
|
41
41
|
"required_scope": "read_products",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"method": "POST",
|
|
55
|
-
"path": "/api/v1/
|
|
55
|
+
"path": "/api/v1/products",
|
|
56
56
|
"controller_order": 3,
|
|
57
57
|
"handler_name": "createProduct",
|
|
58
58
|
"required_scope": "write_products",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"method": "PUT",
|
|
93
|
-
"path": "/api/v1/
|
|
93
|
+
"path": "/api/v1/products/:id",
|
|
94
94
|
"controller_order": 4,
|
|
95
95
|
"handler_name": "updateProduct",
|
|
96
96
|
"required_scope": "write_products",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"method": "DELETE",
|
|
130
|
-
"path": "/api/v1/
|
|
130
|
+
"path": "/api/v1/products/:id",
|
|
131
131
|
"controller_order": 5,
|
|
132
132
|
"handler_name": "deleteProduct",
|
|
133
133
|
"required_scope": "write_products",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"path": "/api/v1/orders",
|
|
48
48
|
"controller_order": 3,
|
|
49
49
|
"handler_name": "createOrder",
|
|
50
|
-
"required_scope": "
|
|
50
|
+
"required_scope": "write_orders",
|
|
51
51
|
"summary": "Create a new order",
|
|
52
52
|
"description": "Create an order in the merchant's store.",
|
|
53
53
|
"request_body": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"path": "/api/v1/orders/:id",
|
|
75
75
|
"controller_order": 4,
|
|
76
76
|
"handler_name": "updateOrder",
|
|
77
|
-
"required_scope": "
|
|
77
|
+
"required_scope": "write_orders",
|
|
78
78
|
"summary": "Update an existing order",
|
|
79
79
|
"description": "Update order fields. Only provided fields are modified.",
|
|
80
80
|
"path_params": [
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"path": "/api/v1/orders/:id/cancel",
|
|
102
102
|
"controller_order": 5,
|
|
103
103
|
"handler_name": "cancelOrder",
|
|
104
|
-
"required_scope": "
|
|
104
|
+
"required_scope": "write_orders",
|
|
105
105
|
"summary": "Cancel an existing order",
|
|
106
106
|
"description": "Cancel an existing order with optional reason and restock settings.",
|
|
107
107
|
"path_params": [
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"path": "/api/v1/orders/:id/external-id",
|
|
124
124
|
"controller_order": 6,
|
|
125
125
|
"handler_name": "updateOrderExternalId",
|
|
126
|
-
"required_scope": "
|
|
126
|
+
"required_scope": "write_orders",
|
|
127
127
|
"summary": "Update external ID for an order",
|
|
128
128
|
"description": "Updates the external_order_id field for a single order. Useful for syncing with external systems.",
|
|
129
129
|
"path_params": [
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"endpoints": [
|
|
10
10
|
{
|
|
11
11
|
"method": "GET",
|
|
12
|
-
"path": "/api/v1/
|
|
12
|
+
"path": "/api/v1/products",
|
|
13
13
|
"controller_order": 1,
|
|
14
14
|
"handler_name": "getProducts",
|
|
15
15
|
"required_scope": "read_products",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"method": "GET",
|
|
38
|
-
"path": "/api/v1/
|
|
38
|
+
"path": "/api/v1/products/:id",
|
|
39
39
|
"controller_order": 2,
|
|
40
40
|
"handler_name": "getProductById",
|
|
41
41
|
"required_scope": "read_products",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
"method": "POST",
|
|
55
|
-
"path": "/api/v1/
|
|
55
|
+
"path": "/api/v1/products",
|
|
56
56
|
"controller_order": 3,
|
|
57
57
|
"handler_name": "createProduct",
|
|
58
58
|
"required_scope": "write_products",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
"method": "PUT",
|
|
93
|
-
"path": "/api/v1/
|
|
93
|
+
"path": "/api/v1/products/:id",
|
|
94
94
|
"controller_order": 4,
|
|
95
95
|
"handler_name": "updateProduct",
|
|
96
96
|
"required_scope": "write_products",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"method": "DELETE",
|
|
130
|
-
"path": "/api/v1/
|
|
130
|
+
"path": "/api/v1/products/:id",
|
|
131
131
|
"controller_order": 5,
|
|
132
132
|
"handler_name": "deleteProduct",
|
|
133
133
|
"required_scope": "write_products",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"access": "read-only",
|
|
12
12
|
"endpoints": ["GET /api/v1/orders", "GET /api/v1/orders/:id"]
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
"label": "
|
|
14
|
+
"write_orders": {
|
|
15
|
+
"label": "Write Orders",
|
|
16
16
|
"description": "Create, update, and cancel orders",
|
|
17
17
|
"access": "read-write",
|
|
18
18
|
"inherits": "read_orders",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"label": "Read Products",
|
|
34
34
|
"description": "View products and product details",
|
|
35
35
|
"access": "read-only",
|
|
36
|
-
"endpoints": ["GET /api/v1/
|
|
36
|
+
"endpoints": ["GET /api/v1/products", "GET /api/v1/products/:id"]
|
|
37
37
|
},
|
|
38
38
|
"write_products": {
|
|
39
39
|
"label": "Write Products",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"access": "read-write",
|
|
42
42
|
"inherits": "read_products",
|
|
43
43
|
"endpoints": [
|
|
44
|
-
"POST /api/v1/
|
|
45
|
-
"PUT /api/v1/
|
|
46
|
-
"DELETE /api/v1/
|
|
44
|
+
"POST /api/v1/products",
|
|
45
|
+
"PUT /api/v1/products/:id",
|
|
46
|
+
"DELETE /api/v1/products/:id"
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
}
|
package/dist/schemas/scopes.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"access": "read-only",
|
|
12
12
|
"endpoints": ["GET /api/v1/orders", "GET /api/v1/orders/:id"]
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
"label": "
|
|
14
|
+
"write_orders": {
|
|
15
|
+
"label": "Write Orders",
|
|
16
16
|
"description": "Create, update, and cancel orders",
|
|
17
17
|
"access": "read-write",
|
|
18
18
|
"inherits": "read_orders",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"label": "Read Products",
|
|
34
34
|
"description": "View products and product details",
|
|
35
35
|
"access": "read-only",
|
|
36
|
-
"endpoints": ["GET /api/v1/
|
|
36
|
+
"endpoints": ["GET /api/v1/products", "GET /api/v1/products/:id"]
|
|
37
37
|
},
|
|
38
38
|
"write_products": {
|
|
39
39
|
"label": "Write Products",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"access": "read-write",
|
|
42
42
|
"inherits": "read_products",
|
|
43
43
|
"endpoints": [
|
|
44
|
-
"POST /api/v1/
|
|
45
|
-
"PUT /api/v1/
|
|
46
|
-
"DELETE /api/v1/
|
|
44
|
+
"POST /api/v1/products",
|
|
45
|
+
"PUT /api/v1/products/:id",
|
|
46
|
+
"DELETE /api/v1/products/:id"
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-code.d.ts","sourceRoot":"","sources":["../../src/tools/validate-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate-code.d.ts","sourceRoot":"","sources":["../../src/tools/validate-code.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,mBAAmB,CAAC;AAqB3E;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,GAAG,gBAAgB,CAgLnB"}
|
|
@@ -3,7 +3,6 @@ import { loadResourceSchema } from '../utils/schema-loader.js';
|
|
|
3
3
|
* Resolve scope inheritance:
|
|
4
4
|
* - write_X includes read_X
|
|
5
5
|
* - delete_X includes write_X and read_X
|
|
6
|
-
* - order-create / order-update / order-cancel include read_orders
|
|
7
6
|
*/
|
|
8
7
|
function resolveInheritedScopes(scopes) {
|
|
9
8
|
const resolved = new Set(scopes);
|
|
@@ -16,9 +15,6 @@ function resolveInheritedScopes(scopes) {
|
|
|
16
15
|
resolved.add(`write_${resource}`);
|
|
17
16
|
resolved.add(`read_${resource}`);
|
|
18
17
|
}
|
|
19
|
-
else if (['order-create', 'order-update', 'order-cancel'].includes(scope)) {
|
|
20
|
-
resolved.add('read_orders');
|
|
21
|
-
}
|
|
22
18
|
}
|
|
23
19
|
return resolved;
|
|
24
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-code.js","sourceRoot":"","sources":["../../src/tools/validate-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG/D
|
|
1
|
+
{"version":3,"file":"validate-code.js","sourceRoot":"","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M,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ratio-mcp/docs-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,19 +9,20 @@
|
|
|
9
9
|
"bin": {
|
|
10
10
|
"ratio-docs-server": "dist/index.js"
|
|
11
11
|
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc && cp -r src/schemas dist/schemas",
|
|
14
|
+
"dev": "node --loader ts-node/esm src/index.ts",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"prepublishOnly": "pnpm build"
|
|
18
|
+
},
|
|
12
19
|
"dependencies": {
|
|
13
20
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
21
|
+
"@ratio-mcp/shared": "^1.5.0",
|
|
22
|
+
"zod": "^3.23.0"
|
|
16
23
|
},
|
|
17
24
|
"devDependencies": {
|
|
18
25
|
"@types/node": "^20.0.0",
|
|
19
26
|
"typescript": "^5.4.0"
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc && cp -r src/schemas dist/schemas",
|
|
23
|
-
"dev": "node --loader ts-node/esm src/index.ts",
|
|
24
|
-
"start": "node dist/index.js",
|
|
25
|
-
"typecheck": "tsc --noEmit"
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
}
|