@qverisai/mcp 0.5.0 → 0.7.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/README.md +103 -20
- package/dist/api/client.d.ts +14 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +29 -4
- package/dist/api/client.js.map +1 -1
- package/dist/index.d.ts +214 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +248 -191
- package/dist/index.js.map +1 -1
- package/dist/tools/audit-utils.d.ts +52 -0
- package/dist/tools/audit-utils.d.ts.map +1 -0
- package/dist/tools/audit-utils.js +395 -0
- package/dist/tools/audit-utils.js.map +1 -0
- package/dist/tools/credits-ledger.d.ts +57 -0
- package/dist/tools/credits-ledger.d.ts.map +1 -0
- package/dist/tools/credits-ledger.js +124 -0
- package/dist/tools/credits-ledger.js.map +1 -0
- package/dist/tools/execute.d.ts +2 -2
- package/dist/tools/execute.js +2 -2
- package/dist/tools/get-by-ids.d.ts +2 -2
- package/dist/tools/get-by-ids.js +2 -2
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/search.js +2 -2
- package/dist/tools/usage-history.d.ts +72 -0
- package/dist/tools/usage-history.d.ts.map +1 -0
- package/dist/tools/usage-history.js +135 -0
- package/dist/tools/usage-history.js.map +1 -0
- package/dist/types.d.ts +147 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -7,11 +7,13 @@ Official QVeris MCP Server — Dynamically search and execute tools via natural
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
This SDK provides a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables LLMs to discover and execute third-party tools through the QVeris API. With
|
|
11
|
-
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
10
|
+
This SDK provides a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables LLMs to discover and execute third-party tools through the QVeris API. With a small set of tools, your AI assistant can:
|
|
11
|
+
|
|
12
|
+
- **Discover** tools using natural language queries
|
|
13
|
+
- **Inspect** detailed information about specific tools by their IDs
|
|
14
|
+
- **Call** any discovered tool with the appropriate parameters
|
|
15
|
+
- **Audit usage** with context-safe summaries or precise filtered records
|
|
16
|
+
- **Review credits ledger** without dumping full account history into context
|
|
15
17
|
|
|
16
18
|
## Quick Start
|
|
17
19
|
|
|
@@ -19,18 +21,35 @@ This SDK provides a [Model Context Protocol (MCP)](https://modelcontextprotocol.
|
|
|
19
21
|
|
|
20
22
|
Visit [QVeris](https://qveris.ai) (Global) or [QVeris](https://qveris.cn) (China) to get your API key.
|
|
21
23
|
|
|
22
|
-
### 2. Configure Your MCP Client
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
### 2. Configure Your MCP Client
|
|
25
|
+
|
|
26
|
+
Use the QVeris CLI to generate config without hand-editing JSON. Placeholder output intentionally fails API key validation until you replace it or use `--include-key`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Print safe config with YOUR_QVERIS_API_KEY placeholder
|
|
30
|
+
qveris mcp configure --target cursor
|
|
31
|
+
|
|
32
|
+
# Write a working config using your resolved API key
|
|
33
|
+
qveris mcp configure --target cursor --write --include-key
|
|
34
|
+
qveris mcp configure --target claude-desktop --write --include-key
|
|
35
|
+
qveris mcp configure --target opencode --write --include-key
|
|
36
|
+
qveris mcp configure --target openclaw --write --include-key
|
|
37
|
+
|
|
38
|
+
# Validate config, or live-probe visible tools for stdio clients
|
|
39
|
+
qveris mcp validate --target cursor
|
|
40
|
+
qveris mcp validate --target cursor --probe
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Add the QVeris server to your MCP client configuration:
|
|
44
|
+
|
|
45
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
27
46
|
|
|
28
47
|
```json
|
|
29
48
|
{
|
|
30
49
|
"mcpServers": {
|
|
31
50
|
"qveris": {
|
|
32
51
|
"command": "npx",
|
|
33
|
-
"args": ["@qverisai/mcp"],
|
|
52
|
+
"args": ["-y", "@qverisai/mcp"],
|
|
34
53
|
"env": {
|
|
35
54
|
"QVERIS_API_KEY": "your-api-key-here"
|
|
36
55
|
}
|
|
@@ -46,7 +65,7 @@ Add the QVeris server to your MCP client configuration:
|
|
|
46
65
|
"mcpServers": {
|
|
47
66
|
"qveris": {
|
|
48
67
|
"command": "npx",
|
|
49
|
-
"args": ["@qverisai/mcp"],
|
|
68
|
+
"args": ["-y", "@qverisai/mcp"],
|
|
50
69
|
"env": {
|
|
51
70
|
"QVERIS_API_KEY": "your-api-key-here"
|
|
52
71
|
}
|
|
@@ -68,7 +87,8 @@ Then your AI assistant can discover and call tools:
|
|
|
68
87
|
The assistant will:
|
|
69
88
|
1. Call `discover` with query "weather"
|
|
70
89
|
2. Optionally call `inspect` to review tool details
|
|
71
|
-
3. Call `call` with the tool_id and parameters
|
|
90
|
+
3. Call `call` with the tool_id and parameters
|
|
91
|
+
4. Use `usage_history` or `credits_ledger` only when the user asks about charge status or balance changes
|
|
72
92
|
|
|
73
93
|
## Available Tools
|
|
74
94
|
|
|
@@ -93,7 +113,7 @@ Discover available tools based on natural language queries.
|
|
|
93
113
|
|
|
94
114
|
### `inspect`
|
|
95
115
|
|
|
96
|
-
Inspect tools by their IDs to get detailed information (parameters, success rate, latency, examples).
|
|
116
|
+
Inspect tools by their IDs to get detailed information (parameters, success rate, latency, examples, and billing_rule when available).
|
|
97
117
|
|
|
98
118
|
| Parameter | Type | Required | Description |
|
|
99
119
|
|-----------|------|----------|-------------|
|
|
@@ -112,7 +132,7 @@ Inspect tools by their IDs to get detailed information (parameters, success rate
|
|
|
112
132
|
|
|
113
133
|
### `call`
|
|
114
134
|
|
|
115
|
-
Call a discovered tool with specific parameters.
|
|
135
|
+
Call a discovered tool with specific parameters.
|
|
116
136
|
|
|
117
137
|
| Parameter | Type | Required | Description |
|
|
118
138
|
|-----------|------|----------|-------------|
|
|
@@ -129,8 +149,71 @@ Call a discovered tool with specific parameters.
|
|
|
129
149
|
"tool_id": "openweathermap.weather.execute.v1",
|
|
130
150
|
"search_id": "abcd1234-ab12-ab12-ab12-abcdef123456",
|
|
131
151
|
"params_to_tool": {"city": "London", "units": "metric"}
|
|
132
|
-
}
|
|
133
|
-
```
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The `call` response may include compact pre-settlement `billing`. Final charge status should be checked with `usage_history` or `credits_ledger`.
|
|
156
|
+
|
|
157
|
+
### `usage_history`
|
|
158
|
+
|
|
159
|
+
Context-safe request-level usage audit. Defaults to aggregated `summary` mode.
|
|
160
|
+
Summary mode requests service-side `summary=true` aggregates when available and falls back to bounded client-side aggregation for older deployments.
|
|
161
|
+
|
|
162
|
+
| Parameter | Type | Required | Description |
|
|
163
|
+
|-----------|------|----------|-------------|
|
|
164
|
+
| `mode` | string | | `summary`, `search`, or `export_file` (default: `summary`) |
|
|
165
|
+
| `start_date` | string | | Start date, `YYYY-MM-DD` |
|
|
166
|
+
| `end_date` | string | | End date, `YYYY-MM-DD` |
|
|
167
|
+
| `bucket` | string | | `hour`, `day`, or `week` for summary aggregation |
|
|
168
|
+
| `execution_id` | string | | Precise execution lookup |
|
|
169
|
+
| `search_id` | string | | Precise search lookup |
|
|
170
|
+
| `charge_outcome` | string | | `charged`, `included`, `failed_not_charged`, `failed_charged_review` |
|
|
171
|
+
| `min_credits` | number | | Lower credit amount bound |
|
|
172
|
+
| `max_credits` | number | | Upper credit amount bound |
|
|
173
|
+
| `limit` | number | | Search row cap, default 10, hard max 50 |
|
|
174
|
+
|
|
175
|
+
Examples:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{ "mode": "summary", "bucket": "hour" }
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{ "mode": "search", "execution_id": "exec-123" }
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{ "mode": "search", "min_credits": 30, "max_credits": 100 }
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### `credits_ledger`
|
|
190
|
+
|
|
191
|
+
Context-safe final credit ledger query. Defaults to aggregated `summary` mode.
|
|
192
|
+
Summary mode requests service-side `summary=true` aggregates when available and falls back to bounded client-side aggregation for older deployments.
|
|
193
|
+
|
|
194
|
+
| Parameter | Type | Required | Description |
|
|
195
|
+
|-----------|------|----------|-------------|
|
|
196
|
+
| `mode` | string | | `summary`, `search`, or `export_file` (default: `summary`) |
|
|
197
|
+
| `start_date` | string | | Start date, `YYYY-MM-DD` |
|
|
198
|
+
| `end_date` | string | | End date, `YYYY-MM-DD` |
|
|
199
|
+
| `bucket` | string | | `hour`, `day`, or `week` for summary aggregation |
|
|
200
|
+
| `entry_type` | string | | Ledger entry type, for example `consume_tool_execute` |
|
|
201
|
+
| `direction` | string | | `consume`, `grant`, or `any` |
|
|
202
|
+
| `min_credits` | number | | Lower absolute credit amount bound |
|
|
203
|
+
| `max_credits` | number | | Upper absolute credit amount bound |
|
|
204
|
+
| `limit` | number | | Search row cap, default 10, hard max 50 |
|
|
205
|
+
|
|
206
|
+
Examples:
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{ "mode": "summary", "bucket": "day" }
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{ "mode": "search", "direction": "consume", "min_credits": 50 }
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Large result sets should use `mode: "export_file"`. The server writes JSONL under `.qveris/exports/` and returns the file path instead of emitting every row into MCP context.
|
|
134
217
|
|
|
135
218
|
### Deprecated tool names
|
|
136
219
|
|
|
@@ -232,8 +315,8 @@ To override manually, set environment variables in your MCP client config:
|
|
|
232
315
|
|
|
233
316
|
```bash
|
|
234
317
|
# Clone the repository
|
|
235
|
-
git clone https://github.com/QVerisAI/
|
|
236
|
-
cd
|
|
318
|
+
git clone https://github.com/QVerisAI/qveris-agent-toolkit.git
|
|
319
|
+
cd qveris-agent-toolkit/packages/mcp
|
|
237
320
|
|
|
238
321
|
# Install dependencies
|
|
239
322
|
npm install
|
|
@@ -251,6 +334,6 @@ MIT © [QVerisAI](https://github.com/QVerisAI)
|
|
|
251
334
|
|
|
252
335
|
## Support
|
|
253
336
|
|
|
254
|
-
- 🐛 [Issue Tracker](https://github.com/QVerisAI/
|
|
337
|
+
- 🐛 [Issue Tracker](https://github.com/QVerisAI/qveris-agent-toolkit/issues)
|
|
255
338
|
- 💬 Contact: contact@qveris.ai
|
|
256
339
|
|
package/dist/api/client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module api/client
|
|
8
8
|
*/
|
|
9
|
-
import type { SearchRequest, SearchResponse, GetToolsByIdsRequest, ExecuteRequest, ExecuteResponse, QverisClientConfig } from '../types.js';
|
|
9
|
+
import type { SearchRequest, SearchResponse, GetToolsByIdsRequest, ExecuteRequest, ExecuteResponse, CreditsResponse, UsageHistoryRequest, UsageEventsResponse, CreditsLedgerRequest, CreditsLedgerResponse, ApiEnvelope, QverisClientConfig } from '../types.js';
|
|
10
10
|
/**
|
|
11
11
|
* Qveris API Client
|
|
12
12
|
*
|
|
@@ -49,10 +49,22 @@ export declare class QverisClient {
|
|
|
49
49
|
getToolsByIds(request: GetToolsByIdsRequest): Promise<SearchResponse>;
|
|
50
50
|
/**
|
|
51
51
|
* Execute a tool with the specified parameters.
|
|
52
|
-
* This is the Call action
|
|
52
|
+
* This is the Call action; the response may include pre-settlement billing.
|
|
53
53
|
* Uses a longer timeout (120s) by default.
|
|
54
54
|
*/
|
|
55
55
|
executeTool(toolId: string, request: ExecuteRequest): Promise<ExecuteResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Get current credit balance and bucket details.
|
|
58
|
+
*/
|
|
59
|
+
getCredits(): Promise<ApiEnvelope<CreditsResponse> | CreditsResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Query request-level usage audit history.
|
|
62
|
+
*/
|
|
63
|
+
getUsageHistory(request: UsageHistoryRequest): Promise<ApiEnvelope<UsageEventsResponse> | UsageEventsResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Query final credits ledger entries.
|
|
66
|
+
*/
|
|
67
|
+
getCreditsLedger(request: CreditsLedgerRequest): Promise<ApiEnvelope<CreditsLedgerResponse> | CreditsLedgerResponse>;
|
|
56
68
|
}
|
|
57
69
|
/**
|
|
58
70
|
* Creates a Qveris client from environment variables.
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AAkCrB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAE9B,MAAM,EAAE,kBAAkB;IAUtC;;OAEG;YACW,OAAO;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AAkCrB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAE9B,MAAM,EAAE,kBAAkB;IAUtC;;OAEG;YACW,OAAO;IA2FrB;;;OAGG;IACG,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IAIlE;;;OAGG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC;IAI3E;;;;OAIG;IACG,WAAW,CACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC;IAU3B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;IAI3E;;OAEG;IACG,eAAe,CACnB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;IAUlE;;OAEG;IACG,gBAAgB,CACpB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;CASvE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAiBlD"}
|
package/dist/api/client.js
CHANGED
|
@@ -73,12 +73,19 @@ export class QverisClient {
|
|
|
73
73
|
/**
|
|
74
74
|
* Makes an authenticated HTTP request to the Qveris API.
|
|
75
75
|
*/
|
|
76
|
-
async request(method, endpoint, body, timeoutMs) {
|
|
77
|
-
const url = `${this.baseUrl}${endpoint}
|
|
76
|
+
async request(method, endpoint, body, timeoutMs, query) {
|
|
77
|
+
const url = new URL(`${this.baseUrl}${endpoint}`);
|
|
78
|
+
if (query) {
|
|
79
|
+
for (const [key, value] of Object.entries(query)) {
|
|
80
|
+
if (value !== undefined && value !== null && value !== '') {
|
|
81
|
+
url.searchParams.set(key, String(value));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
78
85
|
const controller = new AbortController();
|
|
79
86
|
const timeout = setTimeout(() => controller.abort(), timeoutMs ?? this.defaultTimeoutMs);
|
|
80
87
|
try {
|
|
81
|
-
const response = await fetch(url, {
|
|
88
|
+
const response = await fetch(url.toString(), {
|
|
82
89
|
method,
|
|
83
90
|
headers: {
|
|
84
91
|
'Authorization': `Bearer ${this.apiKey}`,
|
|
@@ -160,13 +167,31 @@ export class QverisClient {
|
|
|
160
167
|
}
|
|
161
168
|
/**
|
|
162
169
|
* Execute a tool with the specified parameters.
|
|
163
|
-
* This is the Call action
|
|
170
|
+
* This is the Call action; the response may include pre-settlement billing.
|
|
164
171
|
* Uses a longer timeout (120s) by default.
|
|
165
172
|
*/
|
|
166
173
|
async executeTool(toolId, request) {
|
|
167
174
|
const endpoint = `/tools/execute?tool_id=${encodeURIComponent(toolId)}`;
|
|
168
175
|
return this.request('POST', endpoint, request, EXECUTE_TIMEOUT_MS);
|
|
169
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Get current credit balance and bucket details.
|
|
179
|
+
*/
|
|
180
|
+
async getCredits() {
|
|
181
|
+
return this.request('GET', '/auth/credits');
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Query request-level usage audit history.
|
|
185
|
+
*/
|
|
186
|
+
async getUsageHistory(request) {
|
|
187
|
+
return this.request('GET', '/auth/usage/history/v2', undefined, this.defaultTimeoutMs, request);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Query final credits ledger entries.
|
|
191
|
+
*/
|
|
192
|
+
async getCreditsLedger(request) {
|
|
193
|
+
return this.request('GET', '/auth/credits/ledger', undefined, this.defaultTimeoutMs, request);
|
|
194
|
+
}
|
|
170
195
|
}
|
|
171
196
|
/**
|
|
172
197
|
* Creates a Qveris client from environment variables.
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3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AAC,OAAO,CACjB,KAAK,EACL,wBAAwB,EACxB,SAAS,EACT,IAAI,CAAC,gBAAgB,EACrB,OAAkC,CACnC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CACjB,KAAK,EACL,sBAAsB,EACtB,SAAS,EACT,IAAI,CAAC,gBAAgB,EACrB,OAAkC,CACnC,CAAC;IACJ,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAE1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,oDAAoD;YACpD,mDAAmD;YACnD,iDAAiD,CAClD,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,CAAC,KAAK,CAAC,WAAW,MAAM,KAAK,YAAY,GAAG,CAAC,CAAC;IAErD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,12 +16,224 @@
|
|
|
16
16
|
* "mcpServers": {
|
|
17
17
|
* "qveris": {
|
|
18
18
|
* "command": "npx",
|
|
19
|
-
* "args": ["@qverisai/mcp"],
|
|
19
|
+
* "args": ["-y", "@qverisai/mcp"],
|
|
20
20
|
* "env": { "QVERIS_API_KEY": "your-api-key" }
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
27
|
+
import { QverisClient } from './api/client.js';
|
|
28
|
+
/**
|
|
29
|
+
* List the MCP tools exposed by this server.
|
|
30
|
+
*
|
|
31
|
+
* Kept as a pure export so the public MCP interface can be tested without
|
|
32
|
+
* starting stdio transport.
|
|
33
|
+
*/
|
|
34
|
+
export declare function listQverisMcpTools(): ({
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object";
|
|
39
|
+
properties: {
|
|
40
|
+
query: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
limit: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
default: number;
|
|
48
|
+
minimum: number;
|
|
49
|
+
maximum: number;
|
|
50
|
+
};
|
|
51
|
+
session_id: {
|
|
52
|
+
type: string;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
required: string[];
|
|
57
|
+
};
|
|
58
|
+
} | {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object";
|
|
63
|
+
properties: {
|
|
64
|
+
tool_ids: {
|
|
65
|
+
type: string;
|
|
66
|
+
items: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
description: string;
|
|
70
|
+
minItems: number;
|
|
71
|
+
};
|
|
72
|
+
search_id: {
|
|
73
|
+
type: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
session_id: {
|
|
77
|
+
type: string;
|
|
78
|
+
description: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
required: string[];
|
|
82
|
+
};
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
description: string;
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: "object";
|
|
88
|
+
properties: {
|
|
89
|
+
tool_id: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
search_id: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
params_to_tool: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
session_id: {
|
|
102
|
+
type: string;
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
max_response_size: {
|
|
106
|
+
type: string;
|
|
107
|
+
description: string;
|
|
108
|
+
default: number;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
required: string[];
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
name: string;
|
|
115
|
+
description: string;
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object";
|
|
118
|
+
properties: {
|
|
119
|
+
mode: {
|
|
120
|
+
type: string;
|
|
121
|
+
enum: string[];
|
|
122
|
+
description: string;
|
|
123
|
+
default: string;
|
|
124
|
+
};
|
|
125
|
+
start_date: {
|
|
126
|
+
type: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
end_date: {
|
|
130
|
+
type: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
bucket: {
|
|
134
|
+
type: string;
|
|
135
|
+
enum: string[];
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
execution_id: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
search_id: {
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
event_type: {
|
|
147
|
+
type: string;
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
kind: {
|
|
151
|
+
type: string;
|
|
152
|
+
description: string;
|
|
153
|
+
};
|
|
154
|
+
success: {
|
|
155
|
+
type: string;
|
|
156
|
+
description: string;
|
|
157
|
+
};
|
|
158
|
+
charge_outcome: {
|
|
159
|
+
type: string;
|
|
160
|
+
enum: string[];
|
|
161
|
+
description: string;
|
|
162
|
+
};
|
|
163
|
+
min_credits: {
|
|
164
|
+
type: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
max_credits: {
|
|
168
|
+
type: string;
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
limit: {
|
|
172
|
+
type: string;
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
} | {
|
|
178
|
+
name: string;
|
|
179
|
+
description: string;
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: "object";
|
|
182
|
+
properties: {
|
|
183
|
+
mode: {
|
|
184
|
+
type: string;
|
|
185
|
+
enum: string[];
|
|
186
|
+
description: string;
|
|
187
|
+
default: string;
|
|
188
|
+
};
|
|
189
|
+
start_date: {
|
|
190
|
+
type: string;
|
|
191
|
+
description: string;
|
|
192
|
+
};
|
|
193
|
+
end_date: {
|
|
194
|
+
type: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
bucket: {
|
|
198
|
+
type: string;
|
|
199
|
+
enum: string[];
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
entry_type: {
|
|
203
|
+
type: string;
|
|
204
|
+
description: string;
|
|
205
|
+
};
|
|
206
|
+
direction: {
|
|
207
|
+
type: string;
|
|
208
|
+
enum: string[];
|
|
209
|
+
description: string;
|
|
210
|
+
default: string;
|
|
211
|
+
};
|
|
212
|
+
min_credits: {
|
|
213
|
+
type: string;
|
|
214
|
+
description: string;
|
|
215
|
+
};
|
|
216
|
+
max_credits: {
|
|
217
|
+
type: string;
|
|
218
|
+
description: string;
|
|
219
|
+
};
|
|
220
|
+
limit: {
|
|
221
|
+
type: string;
|
|
222
|
+
description: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
})[];
|
|
227
|
+
export declare const DEPRECATED_ALIASES: Record<string, string>;
|
|
228
|
+
/**
|
|
229
|
+
* Route one MCP tool call to the matching Qveris operation.
|
|
230
|
+
*/
|
|
231
|
+
export declare function executeQverisMcpTool(client: QverisClient, defaultSessionId: string, rawName: string, args: unknown, warn?: (message: string) => void): Promise<CallToolResult>;
|
|
232
|
+
/**
|
|
233
|
+
* Main entry point for the Qveris MCP Server.
|
|
234
|
+
*
|
|
235
|
+
* Sets up the MCP server with stdio transport, registers the discover,
|
|
236
|
+
* inspect, and call handlers, and starts listening for requests.
|
|
237
|
+
*/
|
|
238
|
+
export declare function main(): Promise<void>;
|
|
27
239
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAuB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAsCpE;;;;;GAKG;AACH,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DjC;AAGD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIrD,CAAC;AAEF;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,YAAY,EACpB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,EACb,IAAI,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAiD,GAC3E,OAAO,CAAC,cAAc,CAAC,CAyLzB;AAED;;;;;GAKG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CA8D1C"}
|