portkey-admin-mcp 0.16.3 → 0.16.4
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/COMPATIBILITY.md +2 -2
- package/ENDPOINTS.md +259 -259
- package/build/index.js +43 -10
- package/build/server.js +43 -10
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -1557,6 +1557,7 @@ var McpIntegrationsService = class extends BaseService {
|
|
|
1557
1557
|
organisation_id: params?.organisation_id,
|
|
1558
1558
|
type: params?.type,
|
|
1559
1559
|
workspace_id: params?.workspace_id,
|
|
1560
|
+
tags: params?.tags === void 0 ? void 0 : JSON.stringify(params.tags),
|
|
1560
1561
|
search: params?.search
|
|
1561
1562
|
});
|
|
1562
1563
|
}
|
|
@@ -1626,7 +1627,8 @@ var McpServersService = class extends BaseService {
|
|
|
1626
1627
|
return this.get("/mcp-servers", {
|
|
1627
1628
|
current_page: params?.current_page,
|
|
1628
1629
|
page_size: params?.page_size,
|
|
1629
|
-
workspace_id: params?.workspace_id
|
|
1630
|
+
workspace_id: params?.workspace_id,
|
|
1631
|
+
tags: params?.tags === void 0 ? void 0 : JSON.stringify(params.tags)
|
|
1630
1632
|
});
|
|
1631
1633
|
}
|
|
1632
1634
|
async createMcpServer(data) {
|
|
@@ -3497,8 +3499,12 @@ var configTargetSchema = z9.object({
|
|
|
3497
3499
|
});
|
|
3498
3500
|
var CONFIGS_TOOL_SCHEMAS = {
|
|
3499
3501
|
listConfigs: {
|
|
3500
|
-
current_page: CurrentPageSchema
|
|
3501
|
-
|
|
3502
|
+
current_page: CurrentPageSchema.describe(
|
|
3503
|
+
"Accepted for compatibility; Portkey ignores it for configs and GET /configs returns the full list"
|
|
3504
|
+
),
|
|
3505
|
+
page_size: PageSizeSchema.describe(
|
|
3506
|
+
"Accepted for compatibility; Portkey ignores it for configs and GET /configs returns the full list"
|
|
3507
|
+
)
|
|
3502
3508
|
},
|
|
3503
3509
|
getConfig: {
|
|
3504
3510
|
slug: z9.string().describe(
|
|
@@ -3506,6 +3512,9 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3506
3512
|
)
|
|
3507
3513
|
},
|
|
3508
3514
|
createConfig: {
|
|
3515
|
+
auto_caching: z9.boolean().optional().describe(
|
|
3516
|
+
"Automatically add Anthropic prompt caching. Set false to disable"
|
|
3517
|
+
),
|
|
3509
3518
|
name: z9.string().describe("Name for the new configuration"),
|
|
3510
3519
|
workspace_id: z9.string().optional().describe("Workspace ID to create config in"),
|
|
3511
3520
|
cache_mode: z9.enum(["simple", "semantic"]).optional().describe("Cache mode: 'simple' or 'semantic'"),
|
|
@@ -3516,6 +3525,9 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3516
3525
|
targets: z9.array(configTargetSchema).optional().describe("Array of target providers with virtual keys")
|
|
3517
3526
|
},
|
|
3518
3527
|
updateConfig: {
|
|
3528
|
+
auto_caching: z9.boolean().optional().describe(
|
|
3529
|
+
"Automatically add Anthropic prompt caching. Set false to disable"
|
|
3530
|
+
),
|
|
3519
3531
|
slug: z9.string().describe("Configuration slug to update"),
|
|
3520
3532
|
name: z9.string().optional().describe("New name for the configuration"),
|
|
3521
3533
|
status: z9.enum(["active", "inactive"]).optional().describe("Configuration status"),
|
|
@@ -3534,6 +3546,7 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3534
3546
|
}
|
|
3535
3547
|
};
|
|
3536
3548
|
var configPayloadSchema = z9.object({
|
|
3549
|
+
auto_caching: z9.boolean().optional(),
|
|
3537
3550
|
cache_mode: z9.enum(["simple", "semantic"]).optional(),
|
|
3538
3551
|
cache_max_age: z9.coerce.number().positive().optional(),
|
|
3539
3552
|
retry_attempts: z9.coerce.number().positive().max(5).optional(),
|
|
@@ -3551,6 +3564,7 @@ function buildConfigPayload(params) {
|
|
|
3551
3564
|
...params.retry_on_status_codes !== void 0 ? { on_status_codes: params.retry_on_status_codes } : {}
|
|
3552
3565
|
} : void 0;
|
|
3553
3566
|
return {
|
|
3567
|
+
...params.auto_caching !== void 0 ? { auto_caching: params.auto_caching } : {},
|
|
3554
3568
|
cache,
|
|
3555
3569
|
retry,
|
|
3556
3570
|
strategy: params.strategy_mode !== void 0 ? { mode: params.strategy_mode } : void 0,
|
|
@@ -3558,13 +3572,13 @@ function buildConfigPayload(params) {
|
|
|
3558
3572
|
};
|
|
3559
3573
|
}
|
|
3560
3574
|
function hasConfigSettings(config) {
|
|
3561
|
-
return config.cache !== void 0 || config.retry !== void 0 || config.strategy !== void 0 || config.targets !== void 0;
|
|
3575
|
+
return config.auto_caching !== void 0 || config.cache !== void 0 || config.retry !== void 0 || config.strategy !== void 0 || config.targets !== void 0;
|
|
3562
3576
|
}
|
|
3563
3577
|
var createConfigSchema = z9.object(CONFIGS_TOOL_SCHEMAS.createConfig).superRefine((value, ctx) => {
|
|
3564
3578
|
if (!hasConfigSettings(buildConfigPayload(value))) {
|
|
3565
3579
|
ctx.addIssue({
|
|
3566
3580
|
code: z9.ZodIssueCode.custom,
|
|
3567
|
-
message: "At least one config setting (cache_mode, retry_attempts, strategy_mode, or targets) must be provided"
|
|
3581
|
+
message: "At least one config setting (auto_caching, cache_mode, retry_attempts, strategy_mode, or targets) must be provided"
|
|
3568
3582
|
});
|
|
3569
3583
|
}
|
|
3570
3584
|
});
|
|
@@ -3611,6 +3625,7 @@ function registerConfigsTools(server, service) {
|
|
|
3611
3625
|
name: response.name,
|
|
3612
3626
|
status: response.status,
|
|
3613
3627
|
config: {
|
|
3628
|
+
auto_caching: response.config.auto_caching,
|
|
3614
3629
|
cache: response.config.cache && {
|
|
3615
3630
|
mode: response.config.cache.mode,
|
|
3616
3631
|
max_age: response.config.cache.max_age
|
|
@@ -3656,7 +3671,7 @@ function registerConfigsTools(server, service) {
|
|
|
3656
3671
|
server.registerTool(
|
|
3657
3672
|
"update_config",
|
|
3658
3673
|
{
|
|
3659
|
-
description: "Update a config by slug; every call creates a new config version rather than overwriting, so earlier versions stay recoverable via list_config_versions. Only provided fields change: name, status, and all routing/cache/retry settings (cache_mode, cache_max_age, retry_attempts, retry_on_status_codes, strategy_mode, targets) are editable, while the slug stays fixed. Changes apply immediately to every API key and prompt referencing the config. Returns the update acknowledgement and new version_id.",
|
|
3674
|
+
description: "Update a config by slug; every call creates a new config version rather than overwriting, so earlier versions stay recoverable via list_config_versions. Only provided fields change: name, status, and all routing/cache/retry settings (auto_caching, cache_mode, cache_max_age, retry_attempts, retry_on_status_codes, strategy_mode, targets) are editable, while the slug stays fixed. Changes apply immediately to every API key and prompt referencing the config. Returns the update acknowledgement and new version_id.",
|
|
3660
3675
|
inputSchema: CONFIGS_TOOL_SCHEMAS.updateConfig,
|
|
3661
3676
|
annotations: {
|
|
3662
3677
|
readOnlyHint: false,
|
|
@@ -5244,6 +5259,7 @@ function formatApiKeySummary(apiKey) {
|
|
|
5244
5259
|
expires_at: apiKey.expires_at,
|
|
5245
5260
|
created_at: apiKey.created_at,
|
|
5246
5261
|
last_updated_at: apiKey.last_updated_at,
|
|
5262
|
+
last_rotated_at: apiKey.last_rotated_at,
|
|
5247
5263
|
creation_mode: apiKey.creation_mode
|
|
5248
5264
|
};
|
|
5249
5265
|
}
|
|
@@ -5266,6 +5282,7 @@ function formatApiKey(apiKey) {
|
|
|
5266
5282
|
reset_usage: apiKey.reset_usage,
|
|
5267
5283
|
created_at: apiKey.created_at,
|
|
5268
5284
|
last_updated_at: apiKey.last_updated_at,
|
|
5285
|
+
last_rotated_at: apiKey.last_rotated_at,
|
|
5269
5286
|
creation_mode: apiKey.creation_mode
|
|
5270
5287
|
};
|
|
5271
5288
|
}
|
|
@@ -5433,7 +5450,7 @@ function registerKeysTools(server, service) {
|
|
|
5433
5450
|
server.registerTool(
|
|
5434
5451
|
"list_api_keys",
|
|
5435
5452
|
{
|
|
5436
|
-
description: "List Portkey API keys for auditing access, scopes, defaults, limits, and expiration. Use this for API keys only; use list_virtual_keys for provider keys. Returns total plus id, type, status, workspace/user scope, limits, defaults, alert emails, and
|
|
5453
|
+
description: "List Portkey API keys for auditing access, scopes, defaults, limits, and expiration. Use this for API keys only; use list_virtual_keys for provider keys. Returns total plus id, type, status, workspace/user scope, limits, defaults, alert emails, creation mode, and the last rotation timestamp when available.",
|
|
5437
5454
|
inputSchema: KEYS_TOOL_SCHEMAS.listApiKeys
|
|
5438
5455
|
},
|
|
5439
5456
|
async (params) => {
|
|
@@ -5451,7 +5468,7 @@ function registerKeysTools(server, service) {
|
|
|
5451
5468
|
server.registerTool(
|
|
5452
5469
|
"get_api_key",
|
|
5453
5470
|
{
|
|
5454
|
-
description: "Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration,
|
|
5471
|
+
description: "Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration, reset state, and the last rotation timestamp when available before changing access.",
|
|
5455
5472
|
inputSchema: KEYS_TOOL_SCHEMAS.getApiKey
|
|
5456
5473
|
},
|
|
5457
5474
|
async (params) => {
|
|
@@ -6314,6 +6331,7 @@ var mcpConfigurationsSchema = z20.record(z20.string(), z20.unknown()).superRefin
|
|
|
6314
6331
|
});
|
|
6315
6332
|
var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
6316
6333
|
listMcpIntegrations: {
|
|
6334
|
+
tags: resourceTagsSchema.optional().describe("Match resources carrying all supplied tags"),
|
|
6317
6335
|
current_page: CurrentPageSchema,
|
|
6318
6336
|
page_size: pageSizeSchema(1e3).describe(
|
|
6319
6337
|
"Number of results per page (max 1000)"
|
|
@@ -6326,6 +6344,9 @@ var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
6326
6344
|
search: z20.string().optional().describe("Search integrations by name")
|
|
6327
6345
|
},
|
|
6328
6346
|
createMcpIntegration: {
|
|
6347
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6348
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6349
|
+
),
|
|
6329
6350
|
name: z20.string().describe("Display name for the MCP integration"),
|
|
6330
6351
|
url: z20.string().describe("URL endpoint of the MCP server to integrate"),
|
|
6331
6352
|
auth_type: z20.string().min(1).describe(
|
|
@@ -6353,6 +6374,9 @@ var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
6353
6374
|
id: z20.string().describe("The MCP integration ID or slug to retrieve")
|
|
6354
6375
|
},
|
|
6355
6376
|
updateMcpIntegration: {
|
|
6377
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6378
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6379
|
+
),
|
|
6356
6380
|
id: z20.string().describe("The MCP integration ID or slug to update"),
|
|
6357
6381
|
name: z20.string().optional().describe("New display name"),
|
|
6358
6382
|
description: z20.string().optional().describe("New description"),
|
|
@@ -6434,6 +6458,7 @@ function formatMcpIntegration(integration) {
|
|
|
6434
6458
|
name: integration.name,
|
|
6435
6459
|
slug: integration.slug,
|
|
6436
6460
|
description: integration.description,
|
|
6461
|
+
tags: integration.tags,
|
|
6437
6462
|
owner_id: integration.owner_id,
|
|
6438
6463
|
workspace_id: integration.workspace_id,
|
|
6439
6464
|
status: integration.status,
|
|
@@ -6540,7 +6565,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
6540
6565
|
server.registerTool(
|
|
6541
6566
|
"update_mcp_integration",
|
|
6542
6567
|
{
|
|
6543
|
-
description: "Update an MCP integration's name, description, URL, auth, transport, headers, or runtime Secret Reference mappings. Only supplied fields change; URL, auth, header, and secret changes apply immediately and can break active clients, so inspect get_mcp_integration first. Use update_mcp_server when changing only a Portkey server instance's display metadata.",
|
|
6568
|
+
description: "Update an MCP integration's name, description, tags, URL, auth, transport, headers, or runtime Secret Reference mappings. Only supplied fields change; URL, auth, header, and secret changes apply immediately and can break active clients, so inspect get_mcp_integration first. Use update_mcp_server when changing only a Portkey server instance's display metadata.",
|
|
6544
6569
|
inputSchema: MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegration,
|
|
6545
6570
|
annotations: {
|
|
6546
6571
|
title: "Update MCP Integration",
|
|
@@ -6679,11 +6704,15 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
6679
6704
|
import { z as z21 } from "zod";
|
|
6680
6705
|
var MCP_SERVERS_TOOL_SCHEMAS = {
|
|
6681
6706
|
listMcpServers: {
|
|
6707
|
+
tags: resourceTagsSchema.optional().describe("Match resources carrying all supplied tags"),
|
|
6682
6708
|
current_page: CurrentPageSchema,
|
|
6683
6709
|
page_size: PageSizeSchema.describe("Number of results per page (max 100)"),
|
|
6684
6710
|
workspace_id: z21.string().optional().describe("Filter by workspace ID")
|
|
6685
6711
|
},
|
|
6686
6712
|
createMcpServer: {
|
|
6713
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6714
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6715
|
+
),
|
|
6687
6716
|
name: z21.string().describe("Display name for the MCP server"),
|
|
6688
6717
|
mcp_integration_id: z21.string().describe("ID or slug of the MCP integration this server belongs to"),
|
|
6689
6718
|
slug: z21.string().optional().describe("Custom slug. Auto-generated if omitted"),
|
|
@@ -6693,6 +6722,9 @@ var MCP_SERVERS_TOOL_SCHEMAS = {
|
|
|
6693
6722
|
id: z21.string().describe("The MCP server ID or slug to retrieve")
|
|
6694
6723
|
},
|
|
6695
6724
|
updateMcpServer: {
|
|
6725
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6726
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6727
|
+
),
|
|
6696
6728
|
id: z21.string().describe("The MCP server ID or slug to update"),
|
|
6697
6729
|
name: z21.string().optional().describe("New display name"),
|
|
6698
6730
|
description: z21.string().optional().describe("New description")
|
|
@@ -6763,6 +6795,7 @@ function formatMcpServer(server) {
|
|
|
6763
6795
|
name: server.name,
|
|
6764
6796
|
slug: server.slug,
|
|
6765
6797
|
description: server.description,
|
|
6798
|
+
tags: server.tags,
|
|
6766
6799
|
mcp_integration_id: server.mcp_integration_id,
|
|
6767
6800
|
status: server.status,
|
|
6768
6801
|
created_at: server.created_at
|
|
@@ -6888,7 +6921,7 @@ function registerMcpServersTools(server, service) {
|
|
|
6888
6921
|
server.registerTool(
|
|
6889
6922
|
"update_mcp_server",
|
|
6890
6923
|
{
|
|
6891
|
-
description: "Update an MCP server's name or
|
|
6924
|
+
description: "Update an MCP server's name, description, or tags. Changes apply immediately, but URL and auth live on the parent integration, so use update_mcp_integration for those fields.",
|
|
6892
6925
|
inputSchema: MCP_SERVERS_TOOL_SCHEMAS.updateMcpServer
|
|
6893
6926
|
},
|
|
6894
6927
|
async (params) => {
|
package/build/server.js
CHANGED
|
@@ -1570,6 +1570,7 @@ var McpIntegrationsService = class extends BaseService {
|
|
|
1570
1570
|
organisation_id: params?.organisation_id,
|
|
1571
1571
|
type: params?.type,
|
|
1572
1572
|
workspace_id: params?.workspace_id,
|
|
1573
|
+
tags: params?.tags === void 0 ? void 0 : JSON.stringify(params.tags),
|
|
1573
1574
|
search: params?.search
|
|
1574
1575
|
});
|
|
1575
1576
|
}
|
|
@@ -1639,7 +1640,8 @@ var McpServersService = class extends BaseService {
|
|
|
1639
1640
|
return this.get("/mcp-servers", {
|
|
1640
1641
|
current_page: params?.current_page,
|
|
1641
1642
|
page_size: params?.page_size,
|
|
1642
|
-
workspace_id: params?.workspace_id
|
|
1643
|
+
workspace_id: params?.workspace_id,
|
|
1644
|
+
tags: params?.tags === void 0 ? void 0 : JSON.stringify(params.tags)
|
|
1643
1645
|
});
|
|
1644
1646
|
}
|
|
1645
1647
|
async createMcpServer(data) {
|
|
@@ -3510,8 +3512,12 @@ var configTargetSchema = z9.object({
|
|
|
3510
3512
|
});
|
|
3511
3513
|
var CONFIGS_TOOL_SCHEMAS = {
|
|
3512
3514
|
listConfigs: {
|
|
3513
|
-
current_page: CurrentPageSchema
|
|
3514
|
-
|
|
3515
|
+
current_page: CurrentPageSchema.describe(
|
|
3516
|
+
"Accepted for compatibility; Portkey ignores it for configs and GET /configs returns the full list"
|
|
3517
|
+
),
|
|
3518
|
+
page_size: PageSizeSchema.describe(
|
|
3519
|
+
"Accepted for compatibility; Portkey ignores it for configs and GET /configs returns the full list"
|
|
3520
|
+
)
|
|
3515
3521
|
},
|
|
3516
3522
|
getConfig: {
|
|
3517
3523
|
slug: z9.string().describe(
|
|
@@ -3519,6 +3525,9 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3519
3525
|
)
|
|
3520
3526
|
},
|
|
3521
3527
|
createConfig: {
|
|
3528
|
+
auto_caching: z9.boolean().optional().describe(
|
|
3529
|
+
"Automatically add Anthropic prompt caching. Set false to disable"
|
|
3530
|
+
),
|
|
3522
3531
|
name: z9.string().describe("Name for the new configuration"),
|
|
3523
3532
|
workspace_id: z9.string().optional().describe("Workspace ID to create config in"),
|
|
3524
3533
|
cache_mode: z9.enum(["simple", "semantic"]).optional().describe("Cache mode: 'simple' or 'semantic'"),
|
|
@@ -3529,6 +3538,9 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3529
3538
|
targets: z9.array(configTargetSchema).optional().describe("Array of target providers with virtual keys")
|
|
3530
3539
|
},
|
|
3531
3540
|
updateConfig: {
|
|
3541
|
+
auto_caching: z9.boolean().optional().describe(
|
|
3542
|
+
"Automatically add Anthropic prompt caching. Set false to disable"
|
|
3543
|
+
),
|
|
3532
3544
|
slug: z9.string().describe("Configuration slug to update"),
|
|
3533
3545
|
name: z9.string().optional().describe("New name for the configuration"),
|
|
3534
3546
|
status: z9.enum(["active", "inactive"]).optional().describe("Configuration status"),
|
|
@@ -3547,6 +3559,7 @@ var CONFIGS_TOOL_SCHEMAS = {
|
|
|
3547
3559
|
}
|
|
3548
3560
|
};
|
|
3549
3561
|
var configPayloadSchema = z9.object({
|
|
3562
|
+
auto_caching: z9.boolean().optional(),
|
|
3550
3563
|
cache_mode: z9.enum(["simple", "semantic"]).optional(),
|
|
3551
3564
|
cache_max_age: z9.coerce.number().positive().optional(),
|
|
3552
3565
|
retry_attempts: z9.coerce.number().positive().max(5).optional(),
|
|
@@ -3564,6 +3577,7 @@ function buildConfigPayload(params) {
|
|
|
3564
3577
|
...params.retry_on_status_codes !== void 0 ? { on_status_codes: params.retry_on_status_codes } : {}
|
|
3565
3578
|
} : void 0;
|
|
3566
3579
|
return {
|
|
3580
|
+
...params.auto_caching !== void 0 ? { auto_caching: params.auto_caching } : {},
|
|
3567
3581
|
cache,
|
|
3568
3582
|
retry,
|
|
3569
3583
|
strategy: params.strategy_mode !== void 0 ? { mode: params.strategy_mode } : void 0,
|
|
@@ -3571,13 +3585,13 @@ function buildConfigPayload(params) {
|
|
|
3571
3585
|
};
|
|
3572
3586
|
}
|
|
3573
3587
|
function hasConfigSettings(config) {
|
|
3574
|
-
return config.cache !== void 0 || config.retry !== void 0 || config.strategy !== void 0 || config.targets !== void 0;
|
|
3588
|
+
return config.auto_caching !== void 0 || config.cache !== void 0 || config.retry !== void 0 || config.strategy !== void 0 || config.targets !== void 0;
|
|
3575
3589
|
}
|
|
3576
3590
|
var createConfigSchema = z9.object(CONFIGS_TOOL_SCHEMAS.createConfig).superRefine((value, ctx) => {
|
|
3577
3591
|
if (!hasConfigSettings(buildConfigPayload(value))) {
|
|
3578
3592
|
ctx.addIssue({
|
|
3579
3593
|
code: z9.ZodIssueCode.custom,
|
|
3580
|
-
message: "At least one config setting (cache_mode, retry_attempts, strategy_mode, or targets) must be provided"
|
|
3594
|
+
message: "At least one config setting (auto_caching, cache_mode, retry_attempts, strategy_mode, or targets) must be provided"
|
|
3581
3595
|
});
|
|
3582
3596
|
}
|
|
3583
3597
|
});
|
|
@@ -3624,6 +3638,7 @@ function registerConfigsTools(server, service) {
|
|
|
3624
3638
|
name: response.name,
|
|
3625
3639
|
status: response.status,
|
|
3626
3640
|
config: {
|
|
3641
|
+
auto_caching: response.config.auto_caching,
|
|
3627
3642
|
cache: response.config.cache && {
|
|
3628
3643
|
mode: response.config.cache.mode,
|
|
3629
3644
|
max_age: response.config.cache.max_age
|
|
@@ -3669,7 +3684,7 @@ function registerConfigsTools(server, service) {
|
|
|
3669
3684
|
server.registerTool(
|
|
3670
3685
|
"update_config",
|
|
3671
3686
|
{
|
|
3672
|
-
description: "Update a config by slug; every call creates a new config version rather than overwriting, so earlier versions stay recoverable via list_config_versions. Only provided fields change: name, status, and all routing/cache/retry settings (cache_mode, cache_max_age, retry_attempts, retry_on_status_codes, strategy_mode, targets) are editable, while the slug stays fixed. Changes apply immediately to every API key and prompt referencing the config. Returns the update acknowledgement and new version_id.",
|
|
3687
|
+
description: "Update a config by slug; every call creates a new config version rather than overwriting, so earlier versions stay recoverable via list_config_versions. Only provided fields change: name, status, and all routing/cache/retry settings (auto_caching, cache_mode, cache_max_age, retry_attempts, retry_on_status_codes, strategy_mode, targets) are editable, while the slug stays fixed. Changes apply immediately to every API key and prompt referencing the config. Returns the update acknowledgement and new version_id.",
|
|
3673
3688
|
inputSchema: CONFIGS_TOOL_SCHEMAS.updateConfig,
|
|
3674
3689
|
annotations: {
|
|
3675
3690
|
readOnlyHint: false,
|
|
@@ -5257,6 +5272,7 @@ function formatApiKeySummary(apiKey) {
|
|
|
5257
5272
|
expires_at: apiKey.expires_at,
|
|
5258
5273
|
created_at: apiKey.created_at,
|
|
5259
5274
|
last_updated_at: apiKey.last_updated_at,
|
|
5275
|
+
last_rotated_at: apiKey.last_rotated_at,
|
|
5260
5276
|
creation_mode: apiKey.creation_mode
|
|
5261
5277
|
};
|
|
5262
5278
|
}
|
|
@@ -5279,6 +5295,7 @@ function formatApiKey(apiKey) {
|
|
|
5279
5295
|
reset_usage: apiKey.reset_usage,
|
|
5280
5296
|
created_at: apiKey.created_at,
|
|
5281
5297
|
last_updated_at: apiKey.last_updated_at,
|
|
5298
|
+
last_rotated_at: apiKey.last_rotated_at,
|
|
5282
5299
|
creation_mode: apiKey.creation_mode
|
|
5283
5300
|
};
|
|
5284
5301
|
}
|
|
@@ -5446,7 +5463,7 @@ function registerKeysTools(server, service) {
|
|
|
5446
5463
|
server.registerTool(
|
|
5447
5464
|
"list_api_keys",
|
|
5448
5465
|
{
|
|
5449
|
-
description: "List Portkey API keys for auditing access, scopes, defaults, limits, and expiration. Use this for API keys only; use list_virtual_keys for provider keys. Returns total plus id, type, status, workspace/user scope, limits, defaults, alert emails, and
|
|
5466
|
+
description: "List Portkey API keys for auditing access, scopes, defaults, limits, and expiration. Use this for API keys only; use list_virtual_keys for provider keys. Returns total plus id, type, status, workspace/user scope, limits, defaults, alert emails, creation mode, and the last rotation timestamp when available.",
|
|
5450
5467
|
inputSchema: KEYS_TOOL_SCHEMAS.listApiKeys
|
|
5451
5468
|
},
|
|
5452
5469
|
async (params) => {
|
|
@@ -5464,7 +5481,7 @@ function registerKeysTools(server, service) {
|
|
|
5464
5481
|
server.registerTool(
|
|
5465
5482
|
"get_api_key",
|
|
5466
5483
|
{
|
|
5467
|
-
description: "Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration,
|
|
5484
|
+
description: "Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration, reset state, and the last rotation timestamp when available before changing access.",
|
|
5468
5485
|
inputSchema: KEYS_TOOL_SCHEMAS.getApiKey
|
|
5469
5486
|
},
|
|
5470
5487
|
async (params) => {
|
|
@@ -6327,6 +6344,7 @@ var mcpConfigurationsSchema = z20.record(z20.string(), z20.unknown()).superRefin
|
|
|
6327
6344
|
});
|
|
6328
6345
|
var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
6329
6346
|
listMcpIntegrations: {
|
|
6347
|
+
tags: resourceTagsSchema.optional().describe("Match resources carrying all supplied tags"),
|
|
6330
6348
|
current_page: CurrentPageSchema,
|
|
6331
6349
|
page_size: pageSizeSchema(1e3).describe(
|
|
6332
6350
|
"Number of results per page (max 1000)"
|
|
@@ -6339,6 +6357,9 @@ var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
6339
6357
|
search: z20.string().optional().describe("Search integrations by name")
|
|
6340
6358
|
},
|
|
6341
6359
|
createMcpIntegration: {
|
|
6360
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6361
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6362
|
+
),
|
|
6342
6363
|
name: z20.string().describe("Display name for the MCP integration"),
|
|
6343
6364
|
url: z20.string().describe("URL endpoint of the MCP server to integrate"),
|
|
6344
6365
|
auth_type: z20.string().min(1).describe(
|
|
@@ -6366,6 +6387,9 @@ var MCP_INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
6366
6387
|
id: z20.string().describe("The MCP integration ID or slug to retrieve")
|
|
6367
6388
|
},
|
|
6368
6389
|
updateMcpIntegration: {
|
|
6390
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6391
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6392
|
+
),
|
|
6369
6393
|
id: z20.string().describe("The MCP integration ID or slug to update"),
|
|
6370
6394
|
name: z20.string().optional().describe("New display name"),
|
|
6371
6395
|
description: z20.string().optional().describe("New description"),
|
|
@@ -6447,6 +6471,7 @@ function formatMcpIntegration(integration) {
|
|
|
6447
6471
|
name: integration.name,
|
|
6448
6472
|
slug: integration.slug,
|
|
6449
6473
|
description: integration.description,
|
|
6474
|
+
tags: integration.tags,
|
|
6450
6475
|
owner_id: integration.owner_id,
|
|
6451
6476
|
workspace_id: integration.workspace_id,
|
|
6452
6477
|
status: integration.status,
|
|
@@ -6553,7 +6578,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
6553
6578
|
server.registerTool(
|
|
6554
6579
|
"update_mcp_integration",
|
|
6555
6580
|
{
|
|
6556
|
-
description: "Update an MCP integration's name, description, URL, auth, transport, headers, or runtime Secret Reference mappings. Only supplied fields change; URL, auth, header, and secret changes apply immediately and can break active clients, so inspect get_mcp_integration first. Use update_mcp_server when changing only a Portkey server instance's display metadata.",
|
|
6581
|
+
description: "Update an MCP integration's name, description, tags, URL, auth, transport, headers, or runtime Secret Reference mappings. Only supplied fields change; URL, auth, header, and secret changes apply immediately and can break active clients, so inspect get_mcp_integration first. Use update_mcp_server when changing only a Portkey server instance's display metadata.",
|
|
6557
6582
|
inputSchema: MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegration,
|
|
6558
6583
|
annotations: {
|
|
6559
6584
|
title: "Update MCP Integration",
|
|
@@ -6692,11 +6717,15 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
6692
6717
|
import { z as z21 } from "zod";
|
|
6693
6718
|
var MCP_SERVERS_TOOL_SCHEMAS = {
|
|
6694
6719
|
listMcpServers: {
|
|
6720
|
+
tags: resourceTagsSchema.optional().describe("Match resources carrying all supplied tags"),
|
|
6695
6721
|
current_page: CurrentPageSchema,
|
|
6696
6722
|
page_size: PageSizeSchema.describe("Number of results per page (max 100)"),
|
|
6697
6723
|
workspace_id: z21.string().optional().describe("Filter by workspace ID")
|
|
6698
6724
|
},
|
|
6699
6725
|
createMcpServer: {
|
|
6726
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6727
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6728
|
+
),
|
|
6700
6729
|
name: z21.string().describe("Display name for the MCP server"),
|
|
6701
6730
|
mcp_integration_id: z21.string().describe("ID or slug of the MCP integration this server belongs to"),
|
|
6702
6731
|
slug: z21.string().optional().describe("Custom slug. Auto-generated if omitted"),
|
|
@@ -6706,6 +6735,9 @@ var MCP_SERVERS_TOOL_SCHEMAS = {
|
|
|
6706
6735
|
id: z21.string().describe("The MCP server ID or slug to retrieve")
|
|
6707
6736
|
},
|
|
6708
6737
|
updateMcpServer: {
|
|
6738
|
+
tags: resourceTagsSchema.nullable().optional().describe(
|
|
6739
|
+
"Key-value tags. Replaces existing tags; pass null to clear. Keys allow letters, numbers, underscores, and hyphens"
|
|
6740
|
+
),
|
|
6709
6741
|
id: z21.string().describe("The MCP server ID or slug to update"),
|
|
6710
6742
|
name: z21.string().optional().describe("New display name"),
|
|
6711
6743
|
description: z21.string().optional().describe("New description")
|
|
@@ -6776,6 +6808,7 @@ function formatMcpServer(server) {
|
|
|
6776
6808
|
name: server.name,
|
|
6777
6809
|
slug: server.slug,
|
|
6778
6810
|
description: server.description,
|
|
6811
|
+
tags: server.tags,
|
|
6779
6812
|
mcp_integration_id: server.mcp_integration_id,
|
|
6780
6813
|
status: server.status,
|
|
6781
6814
|
created_at: server.created_at
|
|
@@ -6901,7 +6934,7 @@ function registerMcpServersTools(server, service) {
|
|
|
6901
6934
|
server.registerTool(
|
|
6902
6935
|
"update_mcp_server",
|
|
6903
6936
|
{
|
|
6904
|
-
description: "Update an MCP server's name or
|
|
6937
|
+
description: "Update an MCP server's name, description, or tags. Changes apply immediately, but URL and auth live on the parent integration, so use update_mcp_integration for those fields.",
|
|
6905
6938
|
inputSchema: MCP_SERVERS_TOOL_SCHEMAS.updateMcpServer
|
|
6906
6939
|
},
|
|
6907
6940
|
async (params) => {
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ci": "npm run quality && npm run lint && npm run knip && npm run typecheck && npm run typecheck:tests && npm run test:coverage && npm run build && npm run verify:tool-quality && npm run test:e2e && npm run verify:readme-tools && npm run verify:generated",
|
|
32
32
|
"start:http": "node build/server.js",
|
|
33
33
|
"generate:lobehub-tools": "npm run build && node scripts/generate-lobehub-tools.mjs && biome format --write lhm.plugin.json",
|
|
34
|
-
"generate:endpoints": "node scripts/generate-endpoints.mjs",
|
|
34
|
+
"generate:endpoints": "node scripts/generate-endpoints.mjs && biome format --write ENDPOINTS.md",
|
|
35
35
|
"update:lobehub": "npm run generate:lobehub-tools && npx -y @lobehub/market-cli@0.0.41 plugin update --dir \"$PWD\"",
|
|
36
36
|
"publish:lobehub": "npm run update:lobehub",
|
|
37
37
|
"prepare": "[ -n \"$CI\" ] || [ -f /.dockerenv ] || [ ! -d .git ] || lefthook install",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"name": "portkey-admin-mcp",
|
|
64
64
|
"mcpName": "io.github.CodesWhat/portkey-admin-mcp",
|
|
65
|
-
"version": "0.16.
|
|
65
|
+
"version": "0.16.4",
|
|
66
66
|
"main": "build/index.js",
|
|
67
67
|
"keywords": [
|
|
68
68
|
"mcp",
|