nvidia-nim-mcp 1.0.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/.env.example +23 -0
- package/LICENSE +21 -0
- package/README.md +448 -0
- package/dist/client.d.ts +119 -0
- package/dist/client.js +178 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.js +50 -0
- package/dist/handlers.d.ts +26 -0
- package/dist/handlers.js +255 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +107 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.js +49 -0
- package/dist/models.d.ts +14 -0
- package/dist/models.js +202 -0
- package/dist/tools.d.ts +624 -0
- package/dist/tools.js +240 -0
- package/package.json +94 -0
- package/scripts/add-shebang.js +29 -0
- package/scripts/postinstall.js +37 -0
- package/scripts/verify-installation.js +56 -0
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ChatMessageSchema: z.ZodObject<{
|
|
3
|
+
role: z.ZodEnum<["system", "user", "assistant"]>;
|
|
4
|
+
content: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
role?: "system" | "user" | "assistant";
|
|
7
|
+
content?: string;
|
|
8
|
+
}, {
|
|
9
|
+
role?: "system" | "user" | "assistant";
|
|
10
|
+
content?: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ToolFunctionSchema: z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
description: z.ZodString;
|
|
15
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
name?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
parameters?: Record<string, unknown>;
|
|
20
|
+
}, {
|
|
21
|
+
name?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
parameters?: Record<string, unknown>;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const ToolSchema: z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"function">;
|
|
27
|
+
function: z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
description: z.ZodString;
|
|
30
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
name?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
parameters?: Record<string, unknown>;
|
|
35
|
+
}, {
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
parameters?: Record<string, unknown>;
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
function?: {
|
|
42
|
+
name?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
parameters?: Record<string, unknown>;
|
|
45
|
+
};
|
|
46
|
+
type?: "function";
|
|
47
|
+
}, {
|
|
48
|
+
function?: {
|
|
49
|
+
name?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
parameters?: Record<string, unknown>;
|
|
52
|
+
};
|
|
53
|
+
type?: "function";
|
|
54
|
+
}>;
|
|
55
|
+
export declare const ChatCompletionSchema: z.ZodObject<{
|
|
56
|
+
model: z.ZodOptional<z.ZodString>;
|
|
57
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
58
|
+
role: z.ZodEnum<["system", "user", "assistant"]>;
|
|
59
|
+
content: z.ZodString;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
role?: "system" | "user" | "assistant";
|
|
62
|
+
content?: string;
|
|
63
|
+
}, {
|
|
64
|
+
role?: "system" | "user" | "assistant";
|
|
65
|
+
content?: string;
|
|
66
|
+
}>, "many">;
|
|
67
|
+
system_prompt: z.ZodOptional<z.ZodString>;
|
|
68
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
stop: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
72
|
+
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
model?: string;
|
|
77
|
+
messages?: {
|
|
78
|
+
role?: "system" | "user" | "assistant";
|
|
79
|
+
content?: string;
|
|
80
|
+
}[];
|
|
81
|
+
system_prompt?: string;
|
|
82
|
+
temperature?: number;
|
|
83
|
+
top_p?: number;
|
|
84
|
+
max_tokens?: number;
|
|
85
|
+
stop?: string | string[];
|
|
86
|
+
frequency_penalty?: number;
|
|
87
|
+
presence_penalty?: number;
|
|
88
|
+
seed?: number;
|
|
89
|
+
}, {
|
|
90
|
+
model?: string;
|
|
91
|
+
messages?: {
|
|
92
|
+
role?: "system" | "user" | "assistant";
|
|
93
|
+
content?: string;
|
|
94
|
+
}[];
|
|
95
|
+
system_prompt?: string;
|
|
96
|
+
temperature?: number;
|
|
97
|
+
top_p?: number;
|
|
98
|
+
max_tokens?: number;
|
|
99
|
+
stop?: string | string[];
|
|
100
|
+
frequency_penalty?: number;
|
|
101
|
+
presence_penalty?: number;
|
|
102
|
+
seed?: number;
|
|
103
|
+
}>;
|
|
104
|
+
export declare const ChatStreamSchema: z.ZodObject<{
|
|
105
|
+
model: z.ZodOptional<z.ZodString>;
|
|
106
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
107
|
+
role: z.ZodEnum<["system", "user", "assistant"]>;
|
|
108
|
+
content: z.ZodString;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
role?: "system" | "user" | "assistant";
|
|
111
|
+
content?: string;
|
|
112
|
+
}, {
|
|
113
|
+
role?: "system" | "user" | "assistant";
|
|
114
|
+
content?: string;
|
|
115
|
+
}>, "many">;
|
|
116
|
+
system_prompt: z.ZodOptional<z.ZodString>;
|
|
117
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
stop: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
121
|
+
frequency_penalty: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
presence_penalty: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
model?: string;
|
|
126
|
+
messages?: {
|
|
127
|
+
role?: "system" | "user" | "assistant";
|
|
128
|
+
content?: string;
|
|
129
|
+
}[];
|
|
130
|
+
system_prompt?: string;
|
|
131
|
+
temperature?: number;
|
|
132
|
+
top_p?: number;
|
|
133
|
+
max_tokens?: number;
|
|
134
|
+
stop?: string | string[];
|
|
135
|
+
frequency_penalty?: number;
|
|
136
|
+
presence_penalty?: number;
|
|
137
|
+
seed?: number;
|
|
138
|
+
}, {
|
|
139
|
+
model?: string;
|
|
140
|
+
messages?: {
|
|
141
|
+
role?: "system" | "user" | "assistant";
|
|
142
|
+
content?: string;
|
|
143
|
+
}[];
|
|
144
|
+
system_prompt?: string;
|
|
145
|
+
temperature?: number;
|
|
146
|
+
top_p?: number;
|
|
147
|
+
max_tokens?: number;
|
|
148
|
+
stop?: string | string[];
|
|
149
|
+
frequency_penalty?: number;
|
|
150
|
+
presence_penalty?: number;
|
|
151
|
+
seed?: number;
|
|
152
|
+
}>;
|
|
153
|
+
export declare const TextGenerationSchema: z.ZodObject<{
|
|
154
|
+
model: z.ZodOptional<z.ZodString>;
|
|
155
|
+
prompt: z.ZodString;
|
|
156
|
+
system_prompt: z.ZodOptional<z.ZodString>;
|
|
157
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
stop: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
model?: string;
|
|
162
|
+
system_prompt?: string;
|
|
163
|
+
temperature?: number;
|
|
164
|
+
max_tokens?: number;
|
|
165
|
+
stop?: string | string[];
|
|
166
|
+
prompt?: string;
|
|
167
|
+
}, {
|
|
168
|
+
model?: string;
|
|
169
|
+
system_prompt?: string;
|
|
170
|
+
temperature?: number;
|
|
171
|
+
max_tokens?: number;
|
|
172
|
+
stop?: string | string[];
|
|
173
|
+
prompt?: string;
|
|
174
|
+
}>;
|
|
175
|
+
export declare const EmbeddingsSchema: z.ZodObject<{
|
|
176
|
+
model: z.ZodOptional<z.ZodString>;
|
|
177
|
+
input: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
178
|
+
encoding_format: z.ZodDefault<z.ZodOptional<z.ZodEnum<["float", "base64"]>>>;
|
|
179
|
+
truncate: z.ZodDefault<z.ZodOptional<z.ZodEnum<["NONE", "START", "END"]>>>;
|
|
180
|
+
}, "strip", z.ZodTypeAny, {
|
|
181
|
+
model?: string;
|
|
182
|
+
input?: string | string[];
|
|
183
|
+
encoding_format?: "base64" | "float";
|
|
184
|
+
truncate?: "NONE" | "START" | "END";
|
|
185
|
+
}, {
|
|
186
|
+
model?: string;
|
|
187
|
+
input?: string | string[];
|
|
188
|
+
encoding_format?: "base64" | "float";
|
|
189
|
+
truncate?: "NONE" | "START" | "END";
|
|
190
|
+
}>;
|
|
191
|
+
export declare const RerankSchema: z.ZodObject<{
|
|
192
|
+
model: z.ZodOptional<z.ZodString>;
|
|
193
|
+
query: z.ZodString;
|
|
194
|
+
passages: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
195
|
+
text: z.ZodString;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
text?: string;
|
|
198
|
+
}, {
|
|
199
|
+
text?: string;
|
|
200
|
+
}>]>, "many">;
|
|
201
|
+
top_k: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
truncate: z.ZodDefault<z.ZodOptional<z.ZodEnum<["NONE", "END"]>>>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
model?: string;
|
|
205
|
+
truncate?: "NONE" | "END";
|
|
206
|
+
query?: string;
|
|
207
|
+
passages?: (string | {
|
|
208
|
+
text?: string;
|
|
209
|
+
})[];
|
|
210
|
+
top_k?: number;
|
|
211
|
+
}, {
|
|
212
|
+
model?: string;
|
|
213
|
+
truncate?: "NONE" | "END";
|
|
214
|
+
query?: string;
|
|
215
|
+
passages?: (string | {
|
|
216
|
+
text?: string;
|
|
217
|
+
})[];
|
|
218
|
+
top_k?: number;
|
|
219
|
+
}>;
|
|
220
|
+
export declare const FunctionCallingSchema: z.ZodObject<{
|
|
221
|
+
model: z.ZodOptional<z.ZodString>;
|
|
222
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
223
|
+
role: z.ZodEnum<["system", "user", "assistant"]>;
|
|
224
|
+
content: z.ZodString;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
role?: "system" | "user" | "assistant";
|
|
227
|
+
content?: string;
|
|
228
|
+
}, {
|
|
229
|
+
role?: "system" | "user" | "assistant";
|
|
230
|
+
content?: string;
|
|
231
|
+
}>, "many">;
|
|
232
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
233
|
+
type: z.ZodLiteral<"function">;
|
|
234
|
+
function: z.ZodObject<{
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
description: z.ZodString;
|
|
237
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
name?: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
parameters?: Record<string, unknown>;
|
|
242
|
+
}, {
|
|
243
|
+
name?: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
parameters?: Record<string, unknown>;
|
|
246
|
+
}>;
|
|
247
|
+
}, "strip", z.ZodTypeAny, {
|
|
248
|
+
function?: {
|
|
249
|
+
name?: string;
|
|
250
|
+
description?: string;
|
|
251
|
+
parameters?: Record<string, unknown>;
|
|
252
|
+
};
|
|
253
|
+
type?: "function";
|
|
254
|
+
}, {
|
|
255
|
+
function?: {
|
|
256
|
+
name?: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
parameters?: Record<string, unknown>;
|
|
259
|
+
};
|
|
260
|
+
type?: "function";
|
|
261
|
+
}>, "many">;
|
|
262
|
+
tool_choice: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "none"]>, z.ZodObject<{
|
|
263
|
+
type: z.ZodLiteral<"function">;
|
|
264
|
+
function: z.ZodObject<{
|
|
265
|
+
name: z.ZodString;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
name?: string;
|
|
268
|
+
}, {
|
|
269
|
+
name?: string;
|
|
270
|
+
}>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
function?: {
|
|
273
|
+
name?: string;
|
|
274
|
+
};
|
|
275
|
+
type?: "function";
|
|
276
|
+
}, {
|
|
277
|
+
function?: {
|
|
278
|
+
name?: string;
|
|
279
|
+
};
|
|
280
|
+
type?: "function";
|
|
281
|
+
}>]>>>;
|
|
282
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
model?: string;
|
|
286
|
+
messages?: {
|
|
287
|
+
role?: "system" | "user" | "assistant";
|
|
288
|
+
content?: string;
|
|
289
|
+
}[];
|
|
290
|
+
temperature?: number;
|
|
291
|
+
max_tokens?: number;
|
|
292
|
+
tools?: {
|
|
293
|
+
function?: {
|
|
294
|
+
name?: string;
|
|
295
|
+
description?: string;
|
|
296
|
+
parameters?: Record<string, unknown>;
|
|
297
|
+
};
|
|
298
|
+
type?: "function";
|
|
299
|
+
}[];
|
|
300
|
+
tool_choice?: "auto" | "none" | {
|
|
301
|
+
function?: {
|
|
302
|
+
name?: string;
|
|
303
|
+
};
|
|
304
|
+
type?: "function";
|
|
305
|
+
};
|
|
306
|
+
}, {
|
|
307
|
+
model?: string;
|
|
308
|
+
messages?: {
|
|
309
|
+
role?: "system" | "user" | "assistant";
|
|
310
|
+
content?: string;
|
|
311
|
+
}[];
|
|
312
|
+
temperature?: number;
|
|
313
|
+
max_tokens?: number;
|
|
314
|
+
tools?: {
|
|
315
|
+
function?: {
|
|
316
|
+
name?: string;
|
|
317
|
+
description?: string;
|
|
318
|
+
parameters?: Record<string, unknown>;
|
|
319
|
+
};
|
|
320
|
+
type?: "function";
|
|
321
|
+
}[];
|
|
322
|
+
tool_choice?: "auto" | "none" | {
|
|
323
|
+
function?: {
|
|
324
|
+
name?: string;
|
|
325
|
+
};
|
|
326
|
+
type?: "function";
|
|
327
|
+
};
|
|
328
|
+
}>;
|
|
329
|
+
export declare const ListModelsSchema: z.ZodObject<{
|
|
330
|
+
category: z.ZodDefault<z.ZodOptional<z.ZodEnum<["language", "embedding", "reranking", "vision", "code", "multimodal", "all"]>>>;
|
|
331
|
+
}, "strip", z.ZodTypeAny, {
|
|
332
|
+
category?: "code" | "language" | "embedding" | "reranking" | "vision" | "multimodal" | "all";
|
|
333
|
+
}, {
|
|
334
|
+
category?: "code" | "language" | "embedding" | "reranking" | "vision" | "multimodal" | "all";
|
|
335
|
+
}>;
|
|
336
|
+
export declare const ModelInfoSchema: z.ZodObject<{
|
|
337
|
+
model_id: z.ZodString;
|
|
338
|
+
}, "strip", z.ZodTypeAny, {
|
|
339
|
+
model_id?: string;
|
|
340
|
+
}, {
|
|
341
|
+
model_id?: string;
|
|
342
|
+
}>;
|
|
343
|
+
export declare const TOOL_DEFINITIONS: readonly [{
|
|
344
|
+
readonly name: "chat_completion";
|
|
345
|
+
readonly description: "Send a multi-turn conversation to a NVIDIA NIM language model and receive a completion. Supports all major open-source LLMs including Llama 3.1, Mistral, Gemma, Qwen, and more.";
|
|
346
|
+
readonly inputSchema: {
|
|
347
|
+
readonly type: "object";
|
|
348
|
+
readonly properties: {
|
|
349
|
+
readonly model: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
readonly description: "NIM model ID (optional, uses default if not set)";
|
|
352
|
+
};
|
|
353
|
+
readonly messages: {
|
|
354
|
+
readonly type: "array";
|
|
355
|
+
readonly items: {
|
|
356
|
+
readonly type: "object";
|
|
357
|
+
readonly properties: {
|
|
358
|
+
readonly role: {
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly enum: readonly ["system", "user", "assistant"];
|
|
361
|
+
};
|
|
362
|
+
readonly content: {
|
|
363
|
+
readonly type: "string";
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
readonly required: readonly ["role", "content"];
|
|
367
|
+
};
|
|
368
|
+
readonly minItems: 1;
|
|
369
|
+
};
|
|
370
|
+
readonly system_prompt: {
|
|
371
|
+
readonly type: "string";
|
|
372
|
+
readonly description: "System prompt to prepend";
|
|
373
|
+
};
|
|
374
|
+
readonly temperature: {
|
|
375
|
+
readonly type: "number";
|
|
376
|
+
readonly minimum: 0;
|
|
377
|
+
readonly maximum: 2;
|
|
378
|
+
};
|
|
379
|
+
readonly top_p: {
|
|
380
|
+
readonly type: "number";
|
|
381
|
+
readonly minimum: 0;
|
|
382
|
+
readonly maximum: 1;
|
|
383
|
+
};
|
|
384
|
+
readonly max_tokens: {
|
|
385
|
+
readonly type: "integer";
|
|
386
|
+
readonly minimum: 1;
|
|
387
|
+
readonly maximum: 131072;
|
|
388
|
+
};
|
|
389
|
+
readonly stop: {
|
|
390
|
+
readonly oneOf: readonly [{
|
|
391
|
+
readonly type: "string";
|
|
392
|
+
}, {
|
|
393
|
+
readonly type: "array";
|
|
394
|
+
readonly items: {
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
};
|
|
397
|
+
}];
|
|
398
|
+
};
|
|
399
|
+
readonly seed: {
|
|
400
|
+
readonly type: "integer";
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
readonly required: readonly ["messages"];
|
|
404
|
+
};
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "text_generation";
|
|
407
|
+
readonly description: "Generate text from a single prompt (simplified interface). Ideal for one-shot tasks like summarization, translation, extraction, or Q&A.";
|
|
408
|
+
readonly inputSchema: {
|
|
409
|
+
readonly type: "object";
|
|
410
|
+
readonly properties: {
|
|
411
|
+
readonly model: {
|
|
412
|
+
readonly type: "string";
|
|
413
|
+
};
|
|
414
|
+
readonly prompt: {
|
|
415
|
+
readonly type: "string";
|
|
416
|
+
readonly description: "Text prompt";
|
|
417
|
+
};
|
|
418
|
+
readonly system_prompt: {
|
|
419
|
+
readonly type: "string";
|
|
420
|
+
};
|
|
421
|
+
readonly temperature: {
|
|
422
|
+
readonly type: "number";
|
|
423
|
+
readonly minimum: 0;
|
|
424
|
+
readonly maximum: 2;
|
|
425
|
+
};
|
|
426
|
+
readonly max_tokens: {
|
|
427
|
+
readonly type: "integer";
|
|
428
|
+
readonly minimum: 1;
|
|
429
|
+
readonly maximum: 131072;
|
|
430
|
+
};
|
|
431
|
+
readonly stop: {
|
|
432
|
+
readonly oneOf: readonly [{
|
|
433
|
+
readonly type: "string";
|
|
434
|
+
}, {
|
|
435
|
+
readonly type: "array";
|
|
436
|
+
readonly items: {
|
|
437
|
+
readonly type: "string";
|
|
438
|
+
};
|
|
439
|
+
}];
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
readonly required: readonly ["prompt"];
|
|
443
|
+
};
|
|
444
|
+
}, {
|
|
445
|
+
readonly name: "create_embeddings";
|
|
446
|
+
readonly description: "Convert text(s) into vector embeddings using NVIDIA NIM embedding models. Useful for semantic search, RAG, clustering, and similarity comparisons.";
|
|
447
|
+
readonly inputSchema: {
|
|
448
|
+
readonly type: "object";
|
|
449
|
+
readonly properties: {
|
|
450
|
+
readonly model: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
readonly description: "Embedding model ID (e.g. nvidia/nv-embed-v1)";
|
|
453
|
+
};
|
|
454
|
+
readonly input: {
|
|
455
|
+
readonly oneOf: readonly [{
|
|
456
|
+
readonly type: "string";
|
|
457
|
+
}, {
|
|
458
|
+
readonly type: "array";
|
|
459
|
+
readonly items: {
|
|
460
|
+
readonly type: "string";
|
|
461
|
+
};
|
|
462
|
+
}];
|
|
463
|
+
readonly description: "Text or list of texts to embed";
|
|
464
|
+
};
|
|
465
|
+
readonly encoding_format: {
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
readonly enum: readonly ["float", "base64"];
|
|
468
|
+
};
|
|
469
|
+
readonly truncate: {
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly enum: readonly ["NONE", "START", "END"];
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
readonly required: readonly ["input"];
|
|
475
|
+
};
|
|
476
|
+
}, {
|
|
477
|
+
readonly name: "rerank_passages";
|
|
478
|
+
readonly description: "Rerank a list of passages by relevance to a query using NVIDIA NIM reranking models. Essential for RAG pipelines to improve retrieval quality.";
|
|
479
|
+
readonly inputSchema: {
|
|
480
|
+
readonly type: "object";
|
|
481
|
+
readonly properties: {
|
|
482
|
+
readonly model: {
|
|
483
|
+
readonly type: "string";
|
|
484
|
+
readonly description: "Reranking model ID";
|
|
485
|
+
};
|
|
486
|
+
readonly query: {
|
|
487
|
+
readonly type: "string";
|
|
488
|
+
readonly description: "Search query";
|
|
489
|
+
};
|
|
490
|
+
readonly passages: {
|
|
491
|
+
readonly type: "array";
|
|
492
|
+
readonly items: {
|
|
493
|
+
readonly oneOf: readonly [{
|
|
494
|
+
readonly type: "string";
|
|
495
|
+
}, {
|
|
496
|
+
readonly type: "object";
|
|
497
|
+
readonly properties: {
|
|
498
|
+
readonly text: {
|
|
499
|
+
readonly type: "string";
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
readonly required: readonly ["text"];
|
|
503
|
+
}];
|
|
504
|
+
};
|
|
505
|
+
readonly minItems: 1;
|
|
506
|
+
readonly maxItems: 100;
|
|
507
|
+
};
|
|
508
|
+
readonly top_k: {
|
|
509
|
+
readonly type: "integer";
|
|
510
|
+
readonly minimum: 1;
|
|
511
|
+
readonly description: "Return top K results";
|
|
512
|
+
};
|
|
513
|
+
readonly truncate: {
|
|
514
|
+
readonly type: "string";
|
|
515
|
+
readonly enum: readonly ["NONE", "END"];
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
readonly required: readonly ["query", "passages"];
|
|
519
|
+
};
|
|
520
|
+
}, {
|
|
521
|
+
readonly name: "function_calling";
|
|
522
|
+
readonly description: "Use NIM models with tool/function calling capabilities. The model will decide which function to call and with what arguments.";
|
|
523
|
+
readonly inputSchema: {
|
|
524
|
+
readonly type: "object";
|
|
525
|
+
readonly properties: {
|
|
526
|
+
readonly model: {
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
};
|
|
529
|
+
readonly messages: {
|
|
530
|
+
readonly type: "array";
|
|
531
|
+
readonly items: {
|
|
532
|
+
readonly type: "object";
|
|
533
|
+
readonly properties: {
|
|
534
|
+
readonly role: {
|
|
535
|
+
readonly type: "string";
|
|
536
|
+
readonly enum: readonly ["system", "user", "assistant"];
|
|
537
|
+
};
|
|
538
|
+
readonly content: {
|
|
539
|
+
readonly type: "string";
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
readonly required: readonly ["role", "content"];
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
readonly tools: {
|
|
546
|
+
readonly type: "array";
|
|
547
|
+
readonly items: {
|
|
548
|
+
readonly type: "object";
|
|
549
|
+
readonly properties: {
|
|
550
|
+
readonly type: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly enum: readonly ["function"];
|
|
553
|
+
};
|
|
554
|
+
readonly function: {
|
|
555
|
+
readonly type: "object";
|
|
556
|
+
readonly properties: {
|
|
557
|
+
readonly name: {
|
|
558
|
+
readonly type: "string";
|
|
559
|
+
};
|
|
560
|
+
readonly description: {
|
|
561
|
+
readonly type: "string";
|
|
562
|
+
};
|
|
563
|
+
readonly parameters: {
|
|
564
|
+
readonly type: "object";
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
readonly required: readonly ["name", "description", "parameters"];
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
readonly required: readonly ["type", "function"];
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
readonly tool_choice: {
|
|
574
|
+
readonly oneOf: readonly [{
|
|
575
|
+
readonly type: "string";
|
|
576
|
+
readonly enum: readonly ["auto", "none"];
|
|
577
|
+
}, {
|
|
578
|
+
readonly type: "object";
|
|
579
|
+
readonly properties: {
|
|
580
|
+
readonly type: {
|
|
581
|
+
readonly type: "string";
|
|
582
|
+
};
|
|
583
|
+
readonly function: {
|
|
584
|
+
readonly type: "object";
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
}];
|
|
588
|
+
};
|
|
589
|
+
readonly temperature: {
|
|
590
|
+
readonly type: "number";
|
|
591
|
+
};
|
|
592
|
+
readonly max_tokens: {
|
|
593
|
+
readonly type: "integer";
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
readonly required: readonly ["messages", "tools"];
|
|
597
|
+
};
|
|
598
|
+
}, {
|
|
599
|
+
readonly name: "list_models";
|
|
600
|
+
readonly description: "List available NVIDIA NIM models, optionally filtered by category (language, embedding, reranking, vision, code).";
|
|
601
|
+
readonly inputSchema: {
|
|
602
|
+
readonly type: "object";
|
|
603
|
+
readonly properties: {
|
|
604
|
+
readonly category: {
|
|
605
|
+
readonly type: "string";
|
|
606
|
+
readonly enum: readonly ["language", "embedding", "reranking", "vision", "code", "multimodal", "all"];
|
|
607
|
+
readonly description: "Filter by model category";
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
}, {
|
|
612
|
+
readonly name: "get_model_info";
|
|
613
|
+
readonly description: "Get detailed information about a specific NVIDIA NIM model.";
|
|
614
|
+
readonly inputSchema: {
|
|
615
|
+
readonly type: "object";
|
|
616
|
+
readonly properties: {
|
|
617
|
+
readonly model_id: {
|
|
618
|
+
readonly type: "string";
|
|
619
|
+
readonly description: "The model ID";
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
readonly required: readonly ["model_id"];
|
|
623
|
+
};
|
|
624
|
+
}];
|