@tokenlabai/mcp-server 0.6.25 → 0.6.27
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 +4 -4
- package/contract/mcp-overlay.json +8 -2
- package/contract/openapi.json +2033 -217
- package/generated/public-contract.json +5 -5
- package/generated/tools.json +72 -61
- package/package.json +1 -1
- package/scripts/generate-contract.mjs +9 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"id": "tokenlab-mcp-server",
|
|
6
6
|
"name": "@tokenlabai/mcp-server",
|
|
7
7
|
"title": "TokenLab MCP Server",
|
|
8
|
-
"version": "0.6.
|
|
8
|
+
"version": "0.6.27",
|
|
9
9
|
"registry_name": "io.github.hedging8563/tokenlab",
|
|
10
10
|
"source_url": "https://github.com/hedging8563/tokenlab-mcp-server",
|
|
11
11
|
"landing_url": "https://tokenlab.sh/mcp",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"openapi": "3.1.0",
|
|
28
28
|
"title": "TokenLab AI Gateway",
|
|
29
29
|
"version": "1.0.0",
|
|
30
|
-
"sha256": "
|
|
31
|
-
"tool_manifest_sha256": "
|
|
30
|
+
"sha256": "724c5ff2f1cd4a83c9459985b3cb4f92222cf232b29b2210b74882801e4edb99",
|
|
31
|
+
"tool_manifest_sha256": "d2e350b8379dbc2386ad339ab61fbd01198dc39df9ff534812d5c864352e684b"
|
|
32
32
|
},
|
|
33
33
|
"profiles": {
|
|
34
34
|
"catalog": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"endpoint_tools": 30,
|
|
55
55
|
"composite_tools": 2,
|
|
56
56
|
"total_tools": 32,
|
|
57
|
-
"input_schema_bytes":
|
|
57
|
+
"input_schema_bytes": 45532,
|
|
58
58
|
"max_input_schema_depth": 8,
|
|
59
59
|
"tool_names": [
|
|
60
60
|
"cancel_task",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"endpoint_tools": 87,
|
|
98
98
|
"composite_tools": 2,
|
|
99
99
|
"total_tools": 89,
|
|
100
|
-
"input_schema_bytes":
|
|
100
|
+
"input_schema_bytes": 73952,
|
|
101
101
|
"max_input_schema_depth": 8,
|
|
102
102
|
"tool_names": [
|
|
103
103
|
"cancel_anthropic_message_batch",
|
package/generated/tools.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"openapi": "3.1.0",
|
|
7
7
|
"title": "TokenLab AI Gateway",
|
|
8
8
|
"version": "1.0.0",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "724c5ff2f1cd4a83c9459985b3cb4f92222cf232b29b2210b74882801e4edb99"
|
|
10
10
|
},
|
|
11
11
|
"default_profile": "core",
|
|
12
12
|
"profiles": [
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"max_endpoint_tools": 87,
|
|
40
40
|
"max_input_schema_bytes": 78000,
|
|
41
41
|
"max_input_schema_depth": 8,
|
|
42
|
-
"max_tools_list_bytes": 115000
|
|
42
|
+
"max_tools_list_bytes": 115000,
|
|
43
|
+
"max_gemini_declarations_bytes": 90000
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
},
|
|
@@ -51,12 +52,12 @@
|
|
|
51
52
|
},
|
|
52
53
|
"core": {
|
|
53
54
|
"endpoint_tools": 30,
|
|
54
|
-
"input_schema_bytes":
|
|
55
|
+
"input_schema_bytes": 45532,
|
|
55
56
|
"max_input_schema_depth": 8
|
|
56
57
|
},
|
|
57
58
|
"full": {
|
|
58
59
|
"endpoint_tools": 87,
|
|
59
|
-
"input_schema_bytes":
|
|
60
|
+
"input_schema_bytes": 73952,
|
|
60
61
|
"max_input_schema_depth": 8
|
|
61
62
|
}
|
|
62
63
|
},
|
|
@@ -313,7 +314,7 @@
|
|
|
313
314
|
"profiles": [
|
|
314
315
|
"full"
|
|
315
316
|
],
|
|
316
|
-
"description": "Counts input tokens for an Anthropic-compatible messages request without creating a model response. Authentication is required; the operation is not billed.",
|
|
317
|
+
"description": "Counts input tokens for an Anthropic-compatible messages request without creating a model response. Authentication is required; the operation is not billed. Verified upstream counting is preferred. Upstream availability failures return a local estimate marked by X-TokenLab-Count-Tokens-Source: local_estimate. Platform authentication, permission and input errors remain errors. Bound files unreadable locally require upstream counting.",
|
|
317
318
|
"input_schema": {
|
|
318
319
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
319
320
|
"type": "object",
|
|
@@ -504,7 +505,7 @@
|
|
|
504
505
|
},
|
|
505
506
|
"prompt": {
|
|
506
507
|
"type": "string",
|
|
507
|
-
"description": "3D model description"
|
|
508
|
+
"description": "3D model description. Required for every model that takes a prompt; an image-to-3D model whose contract lists no prompt is called without one."
|
|
508
509
|
},
|
|
509
510
|
"image": {
|
|
510
511
|
"type": "string",
|
|
@@ -543,9 +544,6 @@
|
|
|
543
544
|
"description": "End-user identifier."
|
|
544
545
|
}
|
|
545
546
|
},
|
|
546
|
-
"required": [
|
|
547
|
-
"prompt"
|
|
548
|
-
],
|
|
549
547
|
"additionalProperties": false
|
|
550
548
|
},
|
|
551
549
|
"bindings": {
|
|
@@ -1348,6 +1346,14 @@
|
|
|
1348
1346
|
"tool_call_id": {
|
|
1349
1347
|
"type": "string",
|
|
1350
1348
|
"description": "ID of the tool call being responded to"
|
|
1349
|
+
},
|
|
1350
|
+
"reasoning_details": {
|
|
1351
|
+
"type": "array",
|
|
1352
|
+
"items": {
|
|
1353
|
+
"type": "object",
|
|
1354
|
+
"additionalProperties": true
|
|
1355
|
+
},
|
|
1356
|
+
"description": "Assistant messages only: the reasoning_details returned in an earlier response, sent back unchanged."
|
|
1351
1357
|
}
|
|
1352
1358
|
}
|
|
1353
1359
|
},
|
|
@@ -1603,7 +1609,45 @@
|
|
|
1603
1609
|
"string",
|
|
1604
1610
|
"null"
|
|
1605
1611
|
],
|
|
1606
|
-
"description": "
|
|
1612
|
+
"description": "TokenLab serves this request at the standard service tier. auto and default are forwarded. Other values, such as flex, priority, fast and ultrafast, are ignored and billed at the standard price."
|
|
1613
|
+
},
|
|
1614
|
+
"anthropic_options": {
|
|
1615
|
+
"type": "object",
|
|
1616
|
+
"description": "Options for Claude models.",
|
|
1617
|
+
"properties": {
|
|
1618
|
+
"prompt_caching": {
|
|
1619
|
+
"type": "boolean",
|
|
1620
|
+
"description": "Set true to cache the start of the prompt on Claude models. TokenLab marks the end of the system prompt and the latest user message as cache points, unless a message already has cache_control."
|
|
1621
|
+
},
|
|
1622
|
+
"prompt_caching_ttl": {
|
|
1623
|
+
"type": "string",
|
|
1624
|
+
"enum": [
|
|
1625
|
+
"5m",
|
|
1626
|
+
"1h"
|
|
1627
|
+
],
|
|
1628
|
+
"description": "Cache lifetime. Defaults to 5m. If the serving route does not support 1h, the 5-minute cache is used and the request is not rejected."
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
"additionalProperties": true
|
|
1632
|
+
},
|
|
1633
|
+
"extra": {
|
|
1634
|
+
"type": "object",
|
|
1635
|
+
"description": "Extension options. extra.prompt_caching and extra.prompt_caching_ttl are the same as the anthropic_options fields.",
|
|
1636
|
+
"properties": {
|
|
1637
|
+
"prompt_caching": {
|
|
1638
|
+
"type": "boolean",
|
|
1639
|
+
"description": "Set true to cache the start of the prompt on Claude models. TokenLab marks the end of the system prompt and the latest user message as cache points, unless a message already has cache_control."
|
|
1640
|
+
},
|
|
1641
|
+
"prompt_caching_ttl": {
|
|
1642
|
+
"type": "string",
|
|
1643
|
+
"enum": [
|
|
1644
|
+
"5m",
|
|
1645
|
+
"1h"
|
|
1646
|
+
],
|
|
1647
|
+
"description": "Cache lifetime. Defaults to 5m. If the serving route does not support 1h, the 5-minute cache is used and the request is not rejected."
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
"additionalProperties": true
|
|
1607
1651
|
}
|
|
1608
1652
|
},
|
|
1609
1653
|
"required": [
|
|
@@ -1647,7 +1691,9 @@
|
|
|
1647
1691
|
"audio",
|
|
1648
1692
|
"translation_options",
|
|
1649
1693
|
"prediction",
|
|
1650
|
-
"service_tier"
|
|
1694
|
+
"service_tier",
|
|
1695
|
+
"anthropic_options",
|
|
1696
|
+
"extra"
|
|
1651
1697
|
],
|
|
1652
1698
|
"files": []
|
|
1653
1699
|
},
|
|
@@ -2205,33 +2251,6 @@
|
|
|
2205
2251
|
"cachedContent": {
|
|
2206
2252
|
"type": "string",
|
|
2207
2253
|
"description": "Gemini cached content resource name for compatible models."
|
|
2208
|
-
},
|
|
2209
|
-
"system_instruction": {
|
|
2210
|
-
"type": "object",
|
|
2211
|
-
"additionalProperties": true,
|
|
2212
|
-
"description": "Original proto field-name spelling of systemInstruction."
|
|
2213
|
-
},
|
|
2214
|
-
"generation_config": {
|
|
2215
|
-
"type": "object",
|
|
2216
|
-
"additionalProperties": true,
|
|
2217
|
-
"description": "Original proto field-name spelling of generationConfig."
|
|
2218
|
-
},
|
|
2219
|
-
"safety_settings": {
|
|
2220
|
-
"type": "array",
|
|
2221
|
-
"items": {
|
|
2222
|
-
"type": "object",
|
|
2223
|
-
"additionalProperties": true
|
|
2224
|
-
},
|
|
2225
|
-
"description": "Original proto field-name spelling of safetySettings."
|
|
2226
|
-
},
|
|
2227
|
-
"tool_config": {
|
|
2228
|
-
"type": "object",
|
|
2229
|
-
"additionalProperties": true,
|
|
2230
|
-
"description": "Original proto field-name spelling of toolConfig."
|
|
2231
|
-
},
|
|
2232
|
-
"cached_content": {
|
|
2233
|
-
"type": "string",
|
|
2234
|
-
"description": "Original proto field-name spelling of cachedContent."
|
|
2235
2254
|
}
|
|
2236
2255
|
},
|
|
2237
2256
|
"required": [
|
|
@@ -2255,12 +2274,7 @@
|
|
|
2255
2274
|
"safetySettings",
|
|
2256
2275
|
"tools",
|
|
2257
2276
|
"toolConfig",
|
|
2258
|
-
"cachedContent"
|
|
2259
|
-
"system_instruction",
|
|
2260
|
-
"generation_config",
|
|
2261
|
-
"safety_settings",
|
|
2262
|
-
"tool_config",
|
|
2263
|
-
"cached_content"
|
|
2277
|
+
"cachedContent"
|
|
2264
2278
|
],
|
|
2265
2279
|
"files": []
|
|
2266
2280
|
},
|
|
@@ -2303,7 +2317,7 @@
|
|
|
2303
2317
|
"prompt": {
|
|
2304
2318
|
"type": "string",
|
|
2305
2319
|
"maxLength": 4000,
|
|
2306
|
-
"description": "Image description"
|
|
2320
|
+
"description": "Image description. Required for every model that takes a prompt; a tool whose contract lists no prompt (background removal, upscaling, vectorizing) is called without one."
|
|
2307
2321
|
},
|
|
2308
2322
|
"model": {
|
|
2309
2323
|
"type": "string",
|
|
@@ -2357,7 +2371,7 @@
|
|
|
2357
2371
|
},
|
|
2358
2372
|
"size": {
|
|
2359
2373
|
"type": "string",
|
|
2360
|
-
"description": "Image size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic sizing, or send WIDTHxHEIGHT; custom dimensions must both be multiples of 16, longest edge <= 3840px, long/short ratio <= 3:1, and total pixels between 655,360 and 8,294,400."
|
|
2374
|
+
"description": "Image size. Defaults are model-specific. For gpt-image-2, omit this field or use auto for automatic sizing, or send WIDTHxHEIGHT; custom dimensions must both be multiples of 16, longest edge <= 3840px, long/short ratio <= 3:1, and total pixels between 655,360 and 8,294,400. For Google image models with resolution tiers (gemini-3.1-flash-image, gemini-3-pro-image, gemini-3.1-flash-lite-image, gemini-nano-banana-2.1, nano-banana-2, nano-banana-2.1, nano-banana-pro), send an output size from the model's size table or a resolution tier: 1K, 2K, or 4K. TokenLab sends a tier as resolution. A tier that the model does not support, or a tier that is different from resolution, returns 400 invalid_image_size_contract. The recommended form for these models is aspect_ratio with resolution."
|
|
2361
2375
|
},
|
|
2362
2376
|
"quality": {
|
|
2363
2377
|
"type": "string",
|
|
@@ -2393,8 +2407,7 @@
|
|
|
2393
2407
|
"url",
|
|
2394
2408
|
"b64_json"
|
|
2395
2409
|
],
|
|
2396
|
-
"
|
|
2397
|
-
"description": "Response format"
|
|
2410
|
+
"description": "How the images are returned. Omitted: when the model returns image bytes, each image is in data[].b64_json, and also in data[].url when TokenLab stored it; when the model returns a link, each image is in data[].url. url: only data[].url. b64_json: only data[].b64_json. Links are TokenLab media-result URLs that stay valid for 30 days."
|
|
2398
2411
|
},
|
|
2399
2412
|
"async": {
|
|
2400
2413
|
"type": "boolean",
|
|
@@ -2452,8 +2465,7 @@
|
|
|
2452
2465
|
}
|
|
2453
2466
|
},
|
|
2454
2467
|
"required": [
|
|
2455
|
-
"model"
|
|
2456
|
-
"prompt"
|
|
2468
|
+
"model"
|
|
2457
2469
|
],
|
|
2458
2470
|
"additionalProperties": false
|
|
2459
2471
|
},
|
|
@@ -2556,7 +2568,7 @@
|
|
|
2556
2568
|
"prompt": {
|
|
2557
2569
|
"type": "string",
|
|
2558
2570
|
"maxLength": 4000,
|
|
2559
|
-
"description": "Image description"
|
|
2571
|
+
"description": "Image description. Required for every model that takes a prompt; a tool whose contract lists no prompt (background removal, upscaling, vectorizing) is called without one."
|
|
2560
2572
|
},
|
|
2561
2573
|
"operation": {
|
|
2562
2574
|
"type": "string",
|
|
@@ -2664,8 +2676,7 @@
|
|
|
2664
2676
|
}
|
|
2665
2677
|
},
|
|
2666
2678
|
"required": [
|
|
2667
|
-
"model"
|
|
2668
|
-
"prompt"
|
|
2679
|
+
"model"
|
|
2669
2680
|
],
|
|
2670
2681
|
"additionalProperties": false
|
|
2671
2682
|
},
|
|
@@ -3180,7 +3191,7 @@
|
|
|
3180
3191
|
"string",
|
|
3181
3192
|
"null"
|
|
3182
3193
|
],
|
|
3183
|
-
"description": "
|
|
3194
|
+
"description": "TokenLab serves this request at the standard service tier. auto and default are forwarded. Other values, such as flex, priority, fast and ultrafast, are ignored and billed at the standard price."
|
|
3184
3195
|
},
|
|
3185
3196
|
"truncation": {
|
|
3186
3197
|
"type": "string",
|
|
@@ -3477,8 +3488,7 @@
|
|
|
3477
3488
|
},
|
|
3478
3489
|
"model": {
|
|
3479
3490
|
"type": "string",
|
|
3480
|
-
"
|
|
3481
|
-
"description": "TTS model. Query GET /v1/models?recommended_for=tts for the current shortlist."
|
|
3491
|
+
"description": "TTS model. There is no default model. Query GET /v1/models?recommended_for=tts for the current shortlist."
|
|
3482
3492
|
},
|
|
3483
3493
|
"input": {
|
|
3484
3494
|
"type": "string",
|
|
@@ -3534,7 +3544,7 @@
|
|
|
3534
3544
|
"sse"
|
|
3535
3545
|
],
|
|
3536
3546
|
"default": "audio",
|
|
3537
|
-
"description": "TokenLab delivery format.
|
|
3547
|
+
"description": "TokenLab delivery format."
|
|
3538
3548
|
},
|
|
3539
3549
|
"speed": {
|
|
3540
3550
|
"type": "number",
|
|
@@ -3550,6 +3560,7 @@
|
|
|
3550
3560
|
}
|
|
3551
3561
|
},
|
|
3552
3562
|
"required": [
|
|
3563
|
+
"model",
|
|
3553
3564
|
"input"
|
|
3554
3565
|
],
|
|
3555
3566
|
"additionalProperties": false
|
|
@@ -8466,7 +8477,7 @@
|
|
|
8466
8477
|
},
|
|
8467
8478
|
"model": {
|
|
8468
8479
|
"type": "string",
|
|
8469
|
-
"description": "
|
|
8480
|
+
"description": "Transcription model ID. There is no default model."
|
|
8470
8481
|
},
|
|
8471
8482
|
"language": {
|
|
8472
8483
|
"type": "string",
|
|
@@ -8572,8 +8583,7 @@
|
|
|
8572
8583
|
"description": "Pass local file path."
|
|
8573
8584
|
},
|
|
8574
8585
|
"model": {
|
|
8575
|
-
"type": "string"
|
|
8576
|
-
"default": "whisper-1"
|
|
8586
|
+
"type": "string"
|
|
8577
8587
|
},
|
|
8578
8588
|
"prompt": {
|
|
8579
8589
|
"type": "string"
|
|
@@ -8588,7 +8598,8 @@
|
|
|
8588
8598
|
}
|
|
8589
8599
|
},
|
|
8590
8600
|
"required": [
|
|
8591
|
-
"file"
|
|
8601
|
+
"file",
|
|
8602
|
+
"model"
|
|
8592
8603
|
],
|
|
8593
8604
|
"additionalProperties": false
|
|
8594
8605
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenlabai/mcp-server",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.27",
|
|
4
4
|
"description": "OpenAPI-generated TokenLab MCP server with 32 default and 89 full-profile tools for catalog, native AI, multimodal, and async APIs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -583,6 +583,15 @@ synchronizedReadme = replaceProjection(
|
|
|
583
583
|
`producing totals of ${catalogProfile.total_tools}, ${coreProfile.total_tools}, and ${fullProfile.total_tools} tools`,
|
|
584
584
|
"README profile totals"
|
|
585
585
|
);
|
|
586
|
+
const coreBudget = profileConfig.core.compatibility_budget;
|
|
587
|
+
const fullBudget = profileConfig.full.compatibility_budget;
|
|
588
|
+
const kilobytes = (bytes) => `${bytes / 1000} KB`;
|
|
589
|
+
synchronizedReadme = replaceProjection(
|
|
590
|
+
synchronizedReadme,
|
|
591
|
+
/Compatibility budgets keep `core` at no more than [^.]+ for the complete `tools\/list` response\. Tests also run the full profile through the Google AI SDK version used by the observed OpenCode\/Gemini failure[^.]*\./,
|
|
592
|
+
`Compatibility budgets keep \`core\` at no more than ${kilobytes(coreBudget.max_tools_list_bytes)} and depth ${coreBudget.max_input_schema_depth}, and \`full\` at no more than ${kilobytes(fullBudget.max_tools_list_bytes)} and depth ${fullBudget.max_input_schema_depth} for the complete \`tools/list\` response. Tests also run the full profile through the Google AI SDK version used by the observed OpenCode/Gemini failure and keep its function declarations within ${kilobytes(fullBudget.max_gemini_declarations_bytes)}.`,
|
|
593
|
+
"README compatibility budgets"
|
|
594
|
+
);
|
|
586
595
|
const synchronizedInstall = replaceProjection(
|
|
587
596
|
installText,
|
|
588
597
|
/The default `core` profile exposes \d+ tools, and `full` exposes \d+\./,
|