portkey-admin-mcp 0.3.0 → 0.3.2
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/build/index.js +150 -169
- package/build/server.js +150 -169
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1866,7 +1866,7 @@ function normalizeAnalyticsParams(params) {
|
|
|
1866
1866
|
function registerAnalyticsTools(server, service) {
|
|
1867
1867
|
server.tool(
|
|
1868
1868
|
"get_cost_analytics",
|
|
1869
|
-
"
|
|
1869
|
+
"Get cost time-series data with summary.total_cost, summary.average_cost_per_request, and per-bucket total/avg cost. Use this for spend analysis and spike detection; use get_token_analytics when you need token volume instead of monetary cost.",
|
|
1870
1870
|
baseAnalyticsSchema,
|
|
1871
1871
|
async (params) => {
|
|
1872
1872
|
const analytics = await service.analytics.getCostAnalytics(
|
|
@@ -1899,7 +1899,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1899
1899
|
);
|
|
1900
1900
|
server.tool(
|
|
1901
1901
|
"get_request_analytics",
|
|
1902
|
-
"
|
|
1902
|
+
"Get request-volume time-series data with summary.total_requests, summary.successful_requests, summary.failed_requests, and per-bucket total/success/failed counts. Use this for traffic and reliability trends; use get_error_analytics when you only need error counts.",
|
|
1903
1903
|
requestAnalyticsSchema,
|
|
1904
1904
|
async (params) => {
|
|
1905
1905
|
const analytics = await service.analytics.getRequestAnalytics(
|
|
@@ -1934,7 +1934,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1934
1934
|
);
|
|
1935
1935
|
server.tool(
|
|
1936
1936
|
"get_token_analytics",
|
|
1937
|
-
"
|
|
1937
|
+
"Get token-usage time-series data with summary.total_tokens, summary.prompt_tokens, summary.completion_tokens, and per-bucket total/prompt/completion counts. Use this for consumption trends; use get_cost_analytics when you need spend instead of token volume.",
|
|
1938
1938
|
baseAnalyticsSchema,
|
|
1939
1939
|
async (params) => {
|
|
1940
1940
|
const analytics = await service.analytics.getTokenAnalytics(
|
|
@@ -1969,7 +1969,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1969
1969
|
);
|
|
1970
1970
|
server.tool(
|
|
1971
1971
|
"get_latency_analytics",
|
|
1972
|
-
"
|
|
1972
|
+
"Get latency time-series data with summary.avg_latency_ms, summary.p50_latency_ms, summary.p90_latency_ms, summary.p99_latency_ms, and per-bucket latency percentiles in ms. Use this to spot slowdowns and regressions; use get_cache_hit_latency when you only want cache-hit latency.",
|
|
1973
1973
|
baseAnalyticsSchema,
|
|
1974
1974
|
async (params) => {
|
|
1975
1975
|
const analytics = await service.analytics.getLatencyAnalytics(
|
|
@@ -2006,7 +2006,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2006
2006
|
);
|
|
2007
2007
|
server.tool(
|
|
2008
2008
|
"get_error_analytics",
|
|
2009
|
-
"
|
|
2009
|
+
"Get error-count time-series data with summary.total_errors and per-bucket counts. Use this for high-level error trends; use get_error_rate_analytics for percentages, or get_error_status_codes_analytics and get_error_stacks_analytics for breakdowns.",
|
|
2010
2010
|
baseAnalyticsSchema,
|
|
2011
2011
|
async (params) => {
|
|
2012
2012
|
const analytics = await service.analytics.getErrorAnalytics(
|
|
@@ -2037,7 +2037,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2037
2037
|
);
|
|
2038
2038
|
server.tool(
|
|
2039
2039
|
"get_error_rate_analytics",
|
|
2040
|
-
"
|
|
2040
|
+
"Get error-rate time-series data with summary.error_rate_percent and per-bucket percentages of total requests. Use this for reliability and SLA trends; use get_error_analytics for absolute error counts instead.",
|
|
2041
2041
|
baseAnalyticsSchema,
|
|
2042
2042
|
async (params) => {
|
|
2043
2043
|
const analytics = await service.analytics.getErrorRateAnalytics(
|
|
@@ -2068,7 +2068,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2068
2068
|
);
|
|
2069
2069
|
server.tool(
|
|
2070
2070
|
"get_cache_hit_latency",
|
|
2071
|
-
"
|
|
2071
|
+
"Get cache-hit-only latency time-series data with summary.total_latency, summary.avg_latency, and per-bucket total/avg latency. Use this to evaluate cached-response speed; use get_latency_analytics for all requests.",
|
|
2072
2072
|
baseAnalyticsSchema,
|
|
2073
2073
|
async (params) => {
|
|
2074
2074
|
const analytics = await service.analytics.getCacheHitLatency(
|
|
@@ -2101,7 +2101,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2101
2101
|
);
|
|
2102
2102
|
server.tool(
|
|
2103
2103
|
"get_cache_hit_rate",
|
|
2104
|
-
"
|
|
2104
|
+
"Get cache-effectiveness time-series data with summary.hit_rate, summary.total_hits, summary.total_misses, and per-bucket hits/misses/rate. Use this to measure cache effectiveness; use get_cache_hit_latency for speed rather than hit/miss ratio.",
|
|
2105
2105
|
baseAnalyticsSchema,
|
|
2106
2106
|
async (params) => {
|
|
2107
2107
|
const analytics = await service.analytics.getCacheHitRate(
|
|
@@ -2136,7 +2136,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2136
2136
|
);
|
|
2137
2137
|
server.tool(
|
|
2138
2138
|
"get_users_analytics",
|
|
2139
|
-
"
|
|
2139
|
+
"Get user-growth time-series data with summary.total_active_users, summary.total_new_users, and per-bucket active/new user counts. Use this for growth and adoption trends; use get_user_requests_analytics for per-user traffic or get_analytics_group_users for per-user cost and token detail.",
|
|
2140
2140
|
baseAnalyticsSchema,
|
|
2141
2141
|
async (params) => {
|
|
2142
2142
|
const analytics = await service.analytics.getUsersAnalytics(
|
|
@@ -2169,7 +2169,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2169
2169
|
);
|
|
2170
2170
|
server.tool(
|
|
2171
2171
|
"get_error_stacks_analytics",
|
|
2172
|
-
"
|
|
2172
|
+
"Get stacked error-series data grouped by HTTP status code over time, with summary and per-code series. Use this to see which error classes dominate; use get_error_status_codes_analytics for distinct-code distribution instead.",
|
|
2173
2173
|
baseAnalyticsSchema,
|
|
2174
2174
|
async (params) => {
|
|
2175
2175
|
const analytics = await service.analytics.getErrorStacksAnalytics(
|
|
@@ -2191,7 +2191,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2191
2191
|
);
|
|
2192
2192
|
server.tool(
|
|
2193
2193
|
"get_error_status_codes_analytics",
|
|
2194
|
-
"
|
|
2194
|
+
"Get HTTP error-code distribution time-series data with summary and per-code series. Use this to see which codes occur most often; use get_error_stacks_analytics for stacked or cumulative breakdowns.",
|
|
2195
2195
|
baseAnalyticsSchema,
|
|
2196
2196
|
async (params) => {
|
|
2197
2197
|
const analytics = await service.analytics.getErrorStatusCodesAnalytics(
|
|
@@ -2213,7 +2213,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2213
2213
|
);
|
|
2214
2214
|
server.tool(
|
|
2215
2215
|
"get_user_requests_analytics",
|
|
2216
|
-
"
|
|
2216
|
+
"Get per-user request-count time-series data with counts grouped by user. Use this to find heavy users and traffic concentration; use get_users_analytics for aggregate active and new user trends instead.",
|
|
2217
2217
|
baseAnalyticsSchema,
|
|
2218
2218
|
async (params) => {
|
|
2219
2219
|
const analytics = await service.analytics.getUserRequestsAnalytics(
|
|
@@ -2235,7 +2235,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2235
2235
|
);
|
|
2236
2236
|
server.tool(
|
|
2237
2237
|
"get_rescued_requests_analytics",
|
|
2238
|
-
"
|
|
2238
|
+
"Get rescued-request time-series data showing requests recovered by retry or fallback handling. Use this only when your configs include resilience features, and use it to measure how often recovery logic saved requests.",
|
|
2239
2239
|
baseAnalyticsSchema,
|
|
2240
2240
|
async (params) => {
|
|
2241
2241
|
const analytics = await service.analytics.getRescuedRequestsAnalytics(
|
|
@@ -2257,7 +2257,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2257
2257
|
);
|
|
2258
2258
|
server.tool(
|
|
2259
2259
|
"get_feedback_analytics",
|
|
2260
|
-
"
|
|
2260
|
+
"Get feedback-submission time-series data with summary totals and per-bucket counts. Use this as the top-level feedback trend view; use get_feedback_models_analytics, get_feedback_scores_analytics, or get_feedback_weighted_analytics for breakdowns.",
|
|
2261
2261
|
baseAnalyticsSchema,
|
|
2262
2262
|
async (params) => {
|
|
2263
2263
|
const analytics = await service.analytics.getFeedbackAnalytics(
|
|
@@ -2279,7 +2279,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
server.tool(
|
|
2281
2281
|
"get_feedback_models_analytics",
|
|
2282
|
-
"
|
|
2282
|
+
"Get feedback time-series data grouped by model, with per-model counts over time. Use this to compare feedback volume and satisfaction across models; use get_feedback_analytics for the overall total instead.",
|
|
2283
2283
|
baseAnalyticsSchema,
|
|
2284
2284
|
async (params) => {
|
|
2285
2285
|
const analytics = await service.analytics.getFeedbackModelsAnalytics(
|
|
@@ -2301,7 +2301,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2301
2301
|
);
|
|
2302
2302
|
server.tool(
|
|
2303
2303
|
"get_feedback_scores_analytics",
|
|
2304
|
-
"
|
|
2304
|
+
"Get raw feedback-score distribution time-series data with per-score buckets. Use this to understand sentiment mix; use get_feedback_weighted_analytics for calibrated scores with weighting.",
|
|
2305
2305
|
baseAnalyticsSchema,
|
|
2306
2306
|
async (params) => {
|
|
2307
2307
|
const analytics = await service.analytics.getFeedbackScoresAnalytics(
|
|
@@ -2323,7 +2323,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2323
2323
|
);
|
|
2324
2324
|
server.tool(
|
|
2325
2325
|
"get_feedback_weighted_analytics",
|
|
2326
|
-
"
|
|
2326
|
+
"Get weighted feedback-score time-series data using the weight recorded at feedback creation. Use this for calibrated quality metrics; use get_feedback_scores_analytics for the raw unweighted distribution.",
|
|
2327
2327
|
baseAnalyticsSchema,
|
|
2328
2328
|
async (params) => {
|
|
2329
2329
|
const analytics = await service.analytics.getFeedbackWeightedAnalytics(
|
|
@@ -2345,7 +2345,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2345
2345
|
);
|
|
2346
2346
|
server.tool(
|
|
2347
2347
|
"get_analytics_group_users",
|
|
2348
|
-
"
|
|
2348
|
+
"Get a paginated per-user breakdown with total_groups, group_count, and a users array containing request count, cost, and token usage. Use this for billing, audits, or top-consumer analysis; use get_users_analytics for aggregate active and new user trends.",
|
|
2349
2349
|
paginatedAnalyticsSchema,
|
|
2350
2350
|
async (params) => {
|
|
2351
2351
|
const analytics = await service.analytics.getAnalyticsGroupUsers(
|
|
@@ -2367,7 +2367,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2367
2367
|
);
|
|
2368
2368
|
server.tool(
|
|
2369
2369
|
"get_analytics_group_models",
|
|
2370
|
-
"
|
|
2370
|
+
"Get a paginated per-model breakdown with total_groups, group_count, and a models array containing request count, cost, and token usage. Use this to compare model cost, popularity, and efficiency; use get_token_analytics or get_cost_analytics for time-series trends instead.",
|
|
2371
2371
|
paginatedAnalyticsSchema,
|
|
2372
2372
|
async (params) => {
|
|
2373
2373
|
const analytics = await service.analytics.getAnalyticsGroupModels(
|
|
@@ -2389,7 +2389,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2389
2389
|
);
|
|
2390
2390
|
server.tool(
|
|
2391
2391
|
"get_analytics_group_metadata",
|
|
2392
|
-
"
|
|
2392
|
+
"Get a paginated metadata breakdown with total_groups, group_count, and a metadata_groups array grouped by the required metadata_key. Use this for custom breakdowns like per-environment or per-feature analysis; pass metadata_key in addition to the time window.",
|
|
2393
2393
|
analyticsGroupMetadataSchema,
|
|
2394
2394
|
async (params) => {
|
|
2395
2395
|
const { metadata_key, ...analyticsParams } = params;
|
|
@@ -2439,7 +2439,7 @@ var AUDIT_TOOL_SCHEMAS = {
|
|
|
2439
2439
|
function registerAuditTools(server, service) {
|
|
2440
2440
|
server.tool(
|
|
2441
2441
|
"list_audit_logs",
|
|
2442
|
-
"
|
|
2442
|
+
"List audit log events for a Portkey workspace or organization. Returns paginated action-level records with actor, resource, metadata, and timestamps for compliance or incident review; use this instead of analytics when you need individual events, not aggregates.",
|
|
2443
2443
|
AUDIT_TOOL_SCHEMAS.listAuditLogs,
|
|
2444
2444
|
async (params) => {
|
|
2445
2445
|
const result = await service.audit.listAuditLogs({
|
|
@@ -2519,7 +2519,7 @@ var COLLECTIONS_TOOL_SCHEMAS = {
|
|
|
2519
2519
|
function registerCollectionsTools(server, service) {
|
|
2520
2520
|
server.tool(
|
|
2521
2521
|
"list_collections",
|
|
2522
|
-
"List
|
|
2522
|
+
"List prompt collections in the workspace, optionally filtering by name or workspace. Returns ids, names, slugs, and timestamps so you can choose a collection_id before create_prompt, get_collection, or list_prompts.",
|
|
2523
2523
|
COLLECTIONS_TOOL_SCHEMAS.listCollections,
|
|
2524
2524
|
async (params) => {
|
|
2525
2525
|
const collections = await service.collections.listCollections(params);
|
|
@@ -2549,7 +2549,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2549
2549
|
);
|
|
2550
2550
|
server.tool(
|
|
2551
2551
|
"create_collection",
|
|
2552
|
-
"Create a new prompt collection for organizing prompts by app. Use
|
|
2552
|
+
"Create a new prompt collection for organizing prompts by app. Use this when you need a new namespace before create_prompt; returns the collection id and slug, and does not move any prompts.",
|
|
2553
2553
|
COLLECTIONS_TOOL_SCHEMAS.createCollection,
|
|
2554
2554
|
async (params) => {
|
|
2555
2555
|
const result = await service.collections.createCollection(params);
|
|
@@ -2573,7 +2573,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2573
2573
|
);
|
|
2574
2574
|
server.tool(
|
|
2575
2575
|
"get_collection",
|
|
2576
|
-
"
|
|
2576
|
+
"Fetch one collection by id or slug and return its name, slug, workspace, and timestamps. Use list_collections when browsing and get_collection when you already know the target.",
|
|
2577
2577
|
COLLECTIONS_TOOL_SCHEMAS.getCollection,
|
|
2578
2578
|
async (params) => {
|
|
2579
2579
|
const collection = await service.collections.getCollection(
|
|
@@ -2602,7 +2602,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2602
2602
|
);
|
|
2603
2603
|
server.tool(
|
|
2604
2604
|
"update_collection",
|
|
2605
|
-
"Update a collection's
|
|
2605
|
+
"Update a collection's name or description only. This does not move prompts or change membership, so use it for metadata changes rather than reorganization.",
|
|
2606
2606
|
COLLECTIONS_TOOL_SCHEMAS.updateCollection,
|
|
2607
2607
|
async (params) => {
|
|
2608
2608
|
await service.collections.updateCollection(params.collection_id, {
|
|
@@ -2628,7 +2628,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2628
2628
|
);
|
|
2629
2629
|
server.tool(
|
|
2630
2630
|
"delete_collection",
|
|
2631
|
-
"Delete a prompt collection by ID. This
|
|
2631
|
+
"Delete a prompt collection by ID. This cannot be undone; prompts stay in the workspace but lose their collection grouping, so reassign them first if organization matters.",
|
|
2632
2632
|
COLLECTIONS_TOOL_SCHEMAS.deleteCollection,
|
|
2633
2633
|
async (params) => {
|
|
2634
2634
|
const result = await service.collections.deleteCollection(
|
|
@@ -2726,7 +2726,7 @@ function hasConfigSettings(config) {
|
|
|
2726
2726
|
function registerConfigsTools(server, service) {
|
|
2727
2727
|
server.tool(
|
|
2728
2728
|
"list_configs",
|
|
2729
|
-
"
|
|
2729
|
+
"List configs in the org with id, slug, name, status, workspace, and timestamps. Use this summary view to find a slug; use get_config for the full routing, cache, retry, and target settings before updating or deleting.",
|
|
2730
2730
|
CONFIGS_TOOL_SCHEMAS.listConfigs,
|
|
2731
2731
|
async () => {
|
|
2732
2732
|
const configs = await service.configs.listConfigs();
|
|
@@ -2760,7 +2760,7 @@ function registerConfigsTools(server, service) {
|
|
|
2760
2760
|
);
|
|
2761
2761
|
server.tool(
|
|
2762
2762
|
"get_config",
|
|
2763
|
-
"
|
|
2763
|
+
"Get one config by slug and return its routing, cache, retry, and target settings. Requires a known slug; use list_configs to discover one before editing.",
|
|
2764
2764
|
CONFIGS_TOOL_SCHEMAS.getConfig,
|
|
2765
2765
|
async (params) => {
|
|
2766
2766
|
const response = await service.configs.getConfig(params.slug);
|
|
@@ -2804,7 +2804,7 @@ function registerConfigsTools(server, service) {
|
|
|
2804
2804
|
);
|
|
2805
2805
|
server.tool(
|
|
2806
2806
|
"create_config",
|
|
2807
|
-
"Create a
|
|
2807
|
+
"Create a config that defines routing, cache, retry, and targets for requests; use update_config to modify an existing one and list_config_versions for history. At least one setting is required, new configs become active immediately once referenced by a key or prompt, and the call returns the new id and version_id.",
|
|
2808
2808
|
CONFIGS_TOOL_SCHEMAS.createConfig,
|
|
2809
2809
|
async (params) => {
|
|
2810
2810
|
const config = buildConfigPayload(params);
|
|
@@ -2844,7 +2844,7 @@ function registerConfigsTools(server, service) {
|
|
|
2844
2844
|
);
|
|
2845
2845
|
server.tool(
|
|
2846
2846
|
"update_config",
|
|
2847
|
-
"Update
|
|
2847
|
+
"Update a config by slug and create a new version. Only provided fields change; name and status are editable, while the slug stays fixed. Use list_config_versions if you need history first.",
|
|
2848
2848
|
CONFIGS_TOOL_SCHEMAS.updateConfig,
|
|
2849
2849
|
async (params) => {
|
|
2850
2850
|
const config = buildConfigPayload(params);
|
|
@@ -2879,7 +2879,7 @@ function registerConfigsTools(server, service) {
|
|
|
2879
2879
|
);
|
|
2880
2880
|
server.tool(
|
|
2881
2881
|
"delete_config",
|
|
2882
|
-
"Delete a
|
|
2882
|
+
"Delete a config by slug. This is permanent, removes all versions, and breaks anything still pointing at that slug; check list_config_versions first.",
|
|
2883
2883
|
CONFIGS_TOOL_SCHEMAS.deleteConfig,
|
|
2884
2884
|
async (params) => {
|
|
2885
2885
|
const result = await service.configs.deleteConfig(params.slug);
|
|
@@ -2902,7 +2902,7 @@ function registerConfigsTools(server, service) {
|
|
|
2902
2902
|
);
|
|
2903
2903
|
server.tool(
|
|
2904
2904
|
"list_config_versions",
|
|
2905
|
-
"List
|
|
2905
|
+
"List every version of a config with version number, config payload, creator, and timestamp. Use this to audit history or compare revisions before update_config or delete_config.",
|
|
2906
2906
|
CONFIGS_TOOL_SCHEMAS.listConfigVersions,
|
|
2907
2907
|
async (params) => {
|
|
2908
2908
|
const result = await service.configs.listConfigVersions(params.slug);
|
|
@@ -2984,7 +2984,7 @@ var GUARDRAILS_TOOL_SCHEMAS = {
|
|
|
2984
2984
|
function registerGuardrailsTools(server, service) {
|
|
2985
2985
|
server.tool(
|
|
2986
2986
|
"list_guardrails",
|
|
2987
|
-
"List
|
|
2987
|
+
"List guardrails in the org with id, slug, status, ownership, and optional workspace/org filters. Use this to find IDs and slugs before get_guardrail, update_guardrail, or delete_guardrail.",
|
|
2988
2988
|
GUARDRAILS_TOOL_SCHEMAS.listGuardrails,
|
|
2989
2989
|
async (params) => {
|
|
2990
2990
|
const result = await service.guardrails.listGuardrails(params);
|
|
@@ -3018,7 +3018,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3018
3018
|
);
|
|
3019
3019
|
server.tool(
|
|
3020
3020
|
"get_guardrail",
|
|
3021
|
-
"
|
|
3021
|
+
"Fetch one guardrail by id or slug with its full checks and actions; use list_guardrails to discover ids first. Use before update_guardrail or delete_guardrail when you need the exact enforcement policy, and returns the full check and action configuration alongside status and ownership.",
|
|
3022
3022
|
GUARDRAILS_TOOL_SCHEMAS.getGuardrail,
|
|
3023
3023
|
async (params) => {
|
|
3024
3024
|
const guardrail = await service.guardrails.getGuardrail(
|
|
@@ -3053,7 +3053,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3053
3053
|
);
|
|
3054
3054
|
server.tool(
|
|
3055
3055
|
"create_guardrail",
|
|
3056
|
-
"Create a
|
|
3056
|
+
"Create a guardrail with checks and actions for request filtering. Create it first, then reference it from configs; the new version becomes the policy anchor for downstream use.",
|
|
3057
3057
|
GUARDRAILS_TOOL_SCHEMAS.createGuardrail,
|
|
3058
3058
|
async (params) => {
|
|
3059
3059
|
const result = await service.guardrails.createGuardrail({
|
|
@@ -3084,7 +3084,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3084
3084
|
);
|
|
3085
3085
|
server.tool(
|
|
3086
3086
|
"update_guardrail",
|
|
3087
|
-
"Update
|
|
3087
|
+
"Update a guardrail's name, checks, or actions, unlike create_guardrail which registers a new one or delete_guardrail which removes it. This creates a new version that takes effect immediately for dependent configs, so review list_guardrails first; returns the updated id, slug, and version_id.",
|
|
3088
3088
|
GUARDRAILS_TOOL_SCHEMAS.updateGuardrail,
|
|
3089
3089
|
async (params) => {
|
|
3090
3090
|
const updateData = {};
|
|
@@ -3122,7 +3122,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3122
3122
|
);
|
|
3123
3123
|
server.tool(
|
|
3124
3124
|
"delete_guardrail",
|
|
3125
|
-
"Delete a guardrail by
|
|
3125
|
+
"Delete a guardrail by id or slug. This is irreversible and removes the check from any configs that reference it, so review dependent configs first.",
|
|
3126
3126
|
GUARDRAILS_TOOL_SCHEMAS.deleteGuardrail,
|
|
3127
3127
|
async (params) => {
|
|
3128
3128
|
const result = await service.guardrails.deleteGuardrail(
|
|
@@ -3285,7 +3285,7 @@ var INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
3285
3285
|
function registerIntegrationsTools(server, service) {
|
|
3286
3286
|
server.tool(
|
|
3287
3287
|
"list_integrations",
|
|
3288
|
-
"List org-level
|
|
3288
|
+
"List org-level AI provider connections with optional workspace or type filters. Use this to find integration slugs before model or workspace updates. Returns total plus id, name, slug, provider, status, description, workspace counts, and config summary.",
|
|
3289
3289
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrations,
|
|
3290
3290
|
async (params) => {
|
|
3291
3291
|
const integrations = await service.integrations.listIntegrations({
|
|
@@ -3323,7 +3323,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3323
3323
|
);
|
|
3324
3324
|
server.tool(
|
|
3325
3325
|
"create_integration",
|
|
3326
|
-
"Create
|
|
3326
|
+
"Create an org-level provider integration. Some backends need provider-specific fields, and the new integration becomes the source for downstream providers and workspace access. Returns the new integration id and slug.",
|
|
3327
3327
|
INTEGRATIONS_TOOL_SCHEMAS.createIntegration,
|
|
3328
3328
|
async (params) => {
|
|
3329
3329
|
const configurations = {};
|
|
@@ -3371,7 +3371,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3371
3371
|
);
|
|
3372
3372
|
server.tool(
|
|
3373
3373
|
"get_integration",
|
|
3374
|
-
"
|
|
3374
|
+
"Fetch one integration by slug, including masked key, workspace access, allowed models, and configuration metadata. Use this before editing provider-specific settings or auditing access.",
|
|
3375
3375
|
INTEGRATIONS_TOOL_SCHEMAS.getIntegration,
|
|
3376
3376
|
async (params) => {
|
|
3377
3377
|
const integration = await service.integrations.getIntegration(
|
|
@@ -3408,7 +3408,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3408
3408
|
);
|
|
3409
3409
|
server.tool(
|
|
3410
3410
|
"update_integration",
|
|
3411
|
-
"Update an
|
|
3411
|
+
"Update an integration's name, key, or provider-specific config. Key and config changes take effect immediately and can disrupt dependent providers or live requests.",
|
|
3412
3412
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegration,
|
|
3413
3413
|
async (params) => {
|
|
3414
3414
|
const configurations = {};
|
|
@@ -3455,7 +3455,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3455
3455
|
);
|
|
3456
3456
|
server.tool(
|
|
3457
3457
|
"delete_integration",
|
|
3458
|
-
"Delete an integration by slug. This
|
|
3458
|
+
"Delete an integration by slug. This is irreversible and stops the org-level connection, which will break dependent virtual keys, providers, and workspace access.",
|
|
3459
3459
|
INTEGRATIONS_TOOL_SCHEMAS.deleteIntegration,
|
|
3460
3460
|
async (params) => {
|
|
3461
3461
|
const result = await service.integrations.deleteIntegration(params.slug);
|
|
@@ -3478,7 +3478,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3478
3478
|
);
|
|
3479
3479
|
server.tool(
|
|
3480
3480
|
"list_integration_models",
|
|
3481
|
-
"List
|
|
3481
|
+
"List models enabled on an integration. Use this to verify model availability before creating prompts or configs. Returns total plus model ids, display names, enabled state, and custom-model markers.",
|
|
3482
3482
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrationModels,
|
|
3483
3483
|
async (params) => {
|
|
3484
3484
|
const models = await service.integrations.listIntegrationModels(
|
|
@@ -3516,7 +3516,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3516
3516
|
);
|
|
3517
3517
|
server.tool(
|
|
3518
3518
|
"update_integration_models",
|
|
3519
|
-
"Enable
|
|
3519
|
+
"Enable, disable, or register custom models for an integration. This changes model availability for every workspace using it, so confirm the downstream impact first. Returns success and the number of models updated.",
|
|
3520
3520
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationModels,
|
|
3521
3521
|
async (params) => {
|
|
3522
3522
|
const result = await service.integrations.updateIntegrationModels(
|
|
@@ -3545,7 +3545,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3545
3545
|
);
|
|
3546
3546
|
server.tool(
|
|
3547
3547
|
"delete_integration_model",
|
|
3548
|
-
"Delete a
|
|
3548
|
+
"Delete a custom model from an integration. Built-in models should be disabled instead, because deletion only applies to custom entries. Returns success after the custom model is removed.",
|
|
3549
3549
|
INTEGRATIONS_TOOL_SCHEMAS.deleteIntegrationModel,
|
|
3550
3550
|
async (params) => {
|
|
3551
3551
|
const result = await service.integrations.deleteIntegrationModel(
|
|
@@ -3571,7 +3571,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3571
3571
|
);
|
|
3572
3572
|
server.tool(
|
|
3573
3573
|
"list_integration_workspaces",
|
|
3574
|
-
"List
|
|
3574
|
+
"List workspaces that can use an integration, with their limits. Use this to audit access or confirm per-workspace cost and rate settings. Returns total plus workspace ids, names, enabled state, usage limits, and rate limits.",
|
|
3575
3575
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrationWorkspaces,
|
|
3576
3576
|
async (params) => {
|
|
3577
3577
|
const workspaces = await service.integrations.listIntegrationWorkspaces(
|
|
@@ -3610,7 +3610,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3610
3610
|
);
|
|
3611
3611
|
server.tool(
|
|
3612
3612
|
"update_integration_workspaces",
|
|
3613
|
-
"Control which workspaces can use an integration and set per-workspace
|
|
3613
|
+
"Control which workspaces can use an integration and set per-workspace limits, unlike update_integration which edits the org-level connection. Call list_integration_workspaces first to review current state; access changes and new limits apply to downstream usage immediately, and the call returns success plus the number of workspaces updated.",
|
|
3614
3614
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationWorkspaces,
|
|
3615
3615
|
async (params) => {
|
|
3616
3616
|
const result = await service.integrations.updateIntegrationWorkspaces(
|
|
@@ -3738,7 +3738,7 @@ var KEYS_TOOL_SCHEMAS = {
|
|
|
3738
3738
|
function registerKeysTools(server, service) {
|
|
3739
3739
|
server.tool(
|
|
3740
3740
|
"list_virtual_keys",
|
|
3741
|
-
"List
|
|
3741
|
+
"List provider API keys stored as virtual keys in your Portkey org. Use this to find slugs before wiring prompts/configs or auditing limits. Returns total plus name, slug, status, usage limits, rate limits, reset state, and model config.",
|
|
3742
3742
|
KEYS_TOOL_SCHEMAS.listVirtualKeys,
|
|
3743
3743
|
async () => {
|
|
3744
3744
|
const virtualKeys = await service.keys.listVirtualKeys();
|
|
@@ -3779,7 +3779,7 @@ function registerKeysTools(server, service) {
|
|
|
3779
3779
|
);
|
|
3780
3780
|
server.tool(
|
|
3781
3781
|
"create_virtual_key",
|
|
3782
|
-
"
|
|
3782
|
+
"Store a provider API key as a virtual key. The raw key is encrypted and only returned at creation time, so save the returned slug and use it in prompts/configs. Optional usage and rate limits apply immediately, and the tool returns the new slug.",
|
|
3783
3783
|
KEYS_TOOL_SCHEMAS.createVirtualKey,
|
|
3784
3784
|
async (params) => {
|
|
3785
3785
|
const result = await service.keys.createVirtualKey({
|
|
@@ -3818,7 +3818,7 @@ function registerKeysTools(server, service) {
|
|
|
3818
3818
|
);
|
|
3819
3819
|
server.tool(
|
|
3820
3820
|
"get_virtual_key",
|
|
3821
|
-
"
|
|
3821
|
+
"Fetch one virtual key by slug, including metadata, a masked secret, limits, status, and model config. Use this before updating or to inspect the current configuration.",
|
|
3822
3822
|
KEYS_TOOL_SCHEMAS.getVirtualKey,
|
|
3823
3823
|
async (params) => {
|
|
3824
3824
|
const virtualKey = await service.keys.getVirtualKey(params.slug);
|
|
@@ -3856,7 +3856,7 @@ function registerKeysTools(server, service) {
|
|
|
3856
3856
|
);
|
|
3857
3857
|
server.tool(
|
|
3858
3858
|
"update_virtual_key",
|
|
3859
|
-
"Update
|
|
3859
|
+
"Update a virtual key's name, secret, note, or limits. Rotating the key takes effect immediately, and limit changes apply to downstream prompts and configs using this slug. Returns the updated name, slug, and status.",
|
|
3860
3860
|
KEYS_TOOL_SCHEMAS.updateVirtualKey,
|
|
3861
3861
|
async (params) => {
|
|
3862
3862
|
const result = await service.keys.updateVirtualKey(params.slug, {
|
|
@@ -3890,7 +3890,7 @@ function registerKeysTools(server, service) {
|
|
|
3890
3890
|
);
|
|
3891
3891
|
server.tool(
|
|
3892
3892
|
"delete_virtual_key",
|
|
3893
|
-
"Delete a virtual key by slug. This
|
|
3893
|
+
"Delete a virtual key by slug. This is irreversible and will break prompts and configs that reference the slug, so confirm no active dependencies first. Returns success after removal.",
|
|
3894
3894
|
KEYS_TOOL_SCHEMAS.deleteVirtualKey,
|
|
3895
3895
|
async (params) => {
|
|
3896
3896
|
const result = await service.keys.deleteVirtualKey(params.slug);
|
|
@@ -3913,7 +3913,7 @@ function registerKeysTools(server, service) {
|
|
|
3913
3913
|
);
|
|
3914
3914
|
server.tool(
|
|
3915
3915
|
"create_api_key",
|
|
3916
|
-
"Create a
|
|
3916
|
+
"Create a Portkey API key for auth. Org keys grant broader access; workspace keys are scoped. The secret is only returned once, and using the key grants access immediately according to its scopes, defaults, and limits. Workspace keys require workspace_id and user keys require user_id.",
|
|
3917
3917
|
KEYS_TOOL_SCHEMAS.createApiKey,
|
|
3918
3918
|
async (params) => {
|
|
3919
3919
|
if (params.type === "workspace" && !params.workspace_id) {
|
|
@@ -3984,7 +3984,7 @@ function registerKeysTools(server, service) {
|
|
|
3984
3984
|
);
|
|
3985
3985
|
server.tool(
|
|
3986
3986
|
"list_api_keys",
|
|
3987
|
-
"List Portkey API keys
|
|
3987
|
+
"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 creation mode.",
|
|
3988
3988
|
KEYS_TOOL_SCHEMAS.listApiKeys,
|
|
3989
3989
|
async (params) => {
|
|
3990
3990
|
const apiKeys = await service.keys.listApiKeys({
|
|
@@ -4037,7 +4037,7 @@ function registerKeysTools(server, service) {
|
|
|
4037
4037
|
);
|
|
4038
4038
|
server.tool(
|
|
4039
4039
|
"get_api_key",
|
|
4040
|
-
"
|
|
4040
|
+
"Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration, and reset state before changing access.",
|
|
4041
4041
|
KEYS_TOOL_SCHEMAS.getApiKey,
|
|
4042
4042
|
async (params) => {
|
|
4043
4043
|
const apiKey = await service.keys.getApiKey(params.id);
|
|
@@ -4084,7 +4084,7 @@ function registerKeysTools(server, service) {
|
|
|
4084
4084
|
);
|
|
4085
4085
|
server.tool(
|
|
4086
4086
|
"update_api_key",
|
|
4087
|
-
"Update an
|
|
4087
|
+
"Update an API key's name, description, scopes, defaults, or limits, unlike delete_api_key which revokes it or create_api_key which issues a new one. Changes take effect immediately for downstream callers, type and sub-type stay fixed after creation, and the call returns success without rotating the secret.",
|
|
4088
4088
|
KEYS_TOOL_SCHEMAS.updateApiKey,
|
|
4089
4089
|
async (params) => {
|
|
4090
4090
|
const result = await service.keys.updateApiKey(params.id, {
|
|
@@ -4122,7 +4122,7 @@ function registerKeysTools(server, service) {
|
|
|
4122
4122
|
);
|
|
4123
4123
|
server.tool(
|
|
4124
4124
|
"delete_api_key",
|
|
4125
|
-
"Delete an API key by UUID. This
|
|
4125
|
+
"Delete an API key by UUID. This cannot be undone, revokes access immediately, and can break active sessions using the key. Returns success after revocation.",
|
|
4126
4126
|
KEYS_TOOL_SCHEMAS.deleteApiKey,
|
|
4127
4127
|
async (params) => {
|
|
4128
4128
|
const result = await service.keys.deleteApiKey(params.id);
|
|
@@ -4182,7 +4182,7 @@ var LABELS_TOOL_SCHEMAS = {
|
|
|
4182
4182
|
function registerLabelsTools(server, service) {
|
|
4183
4183
|
server.tool(
|
|
4184
4184
|
"create_prompt_label",
|
|
4185
|
-
"Create a
|
|
4185
|
+
"Create a prompt label for tagging prompt versions such as production, staging, or experiment. Requires either organisation_id or workspace_id to set scope, returns the new label id, and does not assign it to any versions yet.",
|
|
4186
4186
|
LABELS_TOOL_SCHEMAS.createPromptLabel,
|
|
4187
4187
|
async (params) => {
|
|
4188
4188
|
if (!params.organisation_id && !params.workspace_id) {
|
|
@@ -4222,7 +4222,7 @@ function registerLabelsTools(server, service) {
|
|
|
4222
4222
|
);
|
|
4223
4223
|
server.tool(
|
|
4224
4224
|
"list_prompt_labels",
|
|
4225
|
-
"List
|
|
4225
|
+
"List labels across the workspace or organisation, with optional search and scope filters. Returns ids, names, colors, status, and timestamps so you can choose a label_id before get_prompt_label or update_prompt_version.",
|
|
4226
4226
|
LABELS_TOOL_SCHEMAS.listPromptLabels,
|
|
4227
4227
|
async (params) => {
|
|
4228
4228
|
const result = await service.labels.listLabels(params);
|
|
@@ -4254,7 +4254,7 @@ function registerLabelsTools(server, service) {
|
|
|
4254
4254
|
);
|
|
4255
4255
|
server.tool(
|
|
4256
4256
|
"get_prompt_label",
|
|
4257
|
-
"
|
|
4257
|
+
"Fetch one label's full definition, including scope, color, and status. Use this when you already know the label_id; list_prompt_labels is better for browsing candidates.",
|
|
4258
4258
|
LABELS_TOOL_SCHEMAS.getPromptLabel,
|
|
4259
4259
|
async (params) => {
|
|
4260
4260
|
const label = await service.labels.getLabel(params.label_id, {
|
|
@@ -4288,7 +4288,7 @@ function registerLabelsTools(server, service) {
|
|
|
4288
4288
|
);
|
|
4289
4289
|
server.tool(
|
|
4290
4290
|
"update_prompt_label",
|
|
4291
|
-
"Update a prompt label's name, description, or
|
|
4291
|
+
"Update a prompt label's name, description, or color only, unlike update_prompt_version which changes which label a version carries. This takes effect immediately for all versions already tagged with the label, but does not reassign labels or touch history; use list_prompt_labels to find the label_id first.",
|
|
4292
4292
|
LABELS_TOOL_SCHEMAS.updatePromptLabel,
|
|
4293
4293
|
async (params) => {
|
|
4294
4294
|
const { label_id, ...updateData } = params;
|
|
@@ -4312,7 +4312,7 @@ function registerLabelsTools(server, service) {
|
|
|
4312
4312
|
);
|
|
4313
4313
|
server.tool(
|
|
4314
4314
|
"delete_prompt_label",
|
|
4315
|
-
"Delete a prompt label by ID. This
|
|
4315
|
+
"Delete a prompt label by ID. This cannot be undone; versions carrying the label lose it, and any workflow resolving by that label will need a replacement.",
|
|
4316
4316
|
LABELS_TOOL_SCHEMAS.deletePromptLabel,
|
|
4317
4317
|
async (params) => {
|
|
4318
4318
|
await service.labels.deleteLabel(params.label_id);
|
|
@@ -4464,7 +4464,7 @@ function formatUsageLimitEntity(entity) {
|
|
|
4464
4464
|
function registerLimitsTools(server, service) {
|
|
4465
4465
|
server.tool(
|
|
4466
4466
|
"list_rate_limits",
|
|
4467
|
-
"
|
|
4467
|
+
"List rate limits in the org with id, type, unit, value, status, scope, conditions, and grouping. Use this to find an existing policy before get_rate_limit, update_rate_limit, or delete_rate_limit.",
|
|
4468
4468
|
LIMITS_TOOL_SCHEMAS.listRateLimits,
|
|
4469
4469
|
async (params) => {
|
|
4470
4470
|
const result = await service.limits.listRateLimits(params.workspace_id);
|
|
@@ -4487,7 +4487,7 @@ function registerLimitsTools(server, service) {
|
|
|
4487
4487
|
);
|
|
4488
4488
|
server.tool(
|
|
4489
4489
|
"get_rate_limit",
|
|
4490
|
-
"
|
|
4490
|
+
"Get one rate limit by id and return its full conditions and grouping definition. Use list_rate_limits to discover ids or compare policies first.",
|
|
4491
4491
|
LIMITS_TOOL_SCHEMAS.getRateLimit,
|
|
4492
4492
|
async (params) => {
|
|
4493
4493
|
const result = await service.limits.getRateLimit(params.id);
|
|
@@ -4503,7 +4503,7 @@ function registerLimitsTools(server, service) {
|
|
|
4503
4503
|
);
|
|
4504
4504
|
server.tool(
|
|
4505
4505
|
"create_rate_limit",
|
|
4506
|
-
"Create a
|
|
4506
|
+
"Create a request or token throttle with conditions, group_by, type, unit, and value. conditions and group_by are required; use usage limits when you need a cumulative budget instead.",
|
|
4507
4507
|
LIMITS_TOOL_SCHEMAS.createRateLimit,
|
|
4508
4508
|
async (params) => {
|
|
4509
4509
|
const result = await service.limits.createRateLimit({
|
|
@@ -4535,7 +4535,7 @@ function registerLimitsTools(server, service) {
|
|
|
4535
4535
|
);
|
|
4536
4536
|
server.tool(
|
|
4537
4537
|
"update_rate_limit",
|
|
4538
|
-
"Update
|
|
4538
|
+
"Update a rate limit's name, unit, or value by id. Conditions and group_by are immutable after creation; use get_rate_limit first if you need the full policy.",
|
|
4539
4539
|
LIMITS_TOOL_SCHEMAS.updateRateLimit,
|
|
4540
4540
|
async (params) => {
|
|
4541
4541
|
const result = await service.limits.updateRateLimit(params.id, {
|
|
@@ -4562,7 +4562,7 @@ function registerLimitsTools(server, service) {
|
|
|
4562
4562
|
);
|
|
4563
4563
|
server.tool(
|
|
4564
4564
|
"delete_rate_limit",
|
|
4565
|
-
"Delete a rate limit
|
|
4565
|
+
"Delete a rate limit by id. This is permanent and removes throttling immediately; review dependent configs and virtual keys before deleting.",
|
|
4566
4566
|
LIMITS_TOOL_SCHEMAS.deleteRateLimit,
|
|
4567
4567
|
async (params) => {
|
|
4568
4568
|
await service.limits.deleteRateLimit(params.id);
|
|
@@ -4585,7 +4585,7 @@ function registerLimitsTools(server, service) {
|
|
|
4585
4585
|
);
|
|
4586
4586
|
server.tool(
|
|
4587
4587
|
"list_usage_limits",
|
|
4588
|
-
"
|
|
4588
|
+
"List usage limits in the org with id, type, credit_limit, status, reset schedule, scope, conditions, and grouping. Use this before get_usage_limit, update_usage_limit, or delete_usage_limit.",
|
|
4589
4589
|
LIMITS_TOOL_SCHEMAS.listUsageLimits,
|
|
4590
4590
|
async (params) => {
|
|
4591
4591
|
const result = await service.limits.listUsageLimits(params.workspace_id);
|
|
@@ -4608,7 +4608,7 @@ function registerLimitsTools(server, service) {
|
|
|
4608
4608
|
);
|
|
4609
4609
|
server.tool(
|
|
4610
4610
|
"get_usage_limit",
|
|
4611
|
-
"
|
|
4611
|
+
"Get one usage limit by id and return its full budget, threshold, grouping, and reset details. Use list_usage_limits to discover ids or compare policies first.",
|
|
4612
4612
|
LIMITS_TOOL_SCHEMAS.getUsageLimit,
|
|
4613
4613
|
async (params) => {
|
|
4614
4614
|
const result = await service.limits.getUsageLimit(params.id);
|
|
@@ -4624,7 +4624,7 @@ function registerLimitsTools(server, service) {
|
|
|
4624
4624
|
);
|
|
4625
4625
|
server.tool(
|
|
4626
4626
|
"create_usage_limit",
|
|
4627
|
-
"Create a
|
|
4627
|
+
"Create a cumulative budget for cost or tokens with optional alerts and weekly or monthly resets. conditions and group_by are required; use rate limits when you need request throttling.",
|
|
4628
4628
|
LIMITS_TOOL_SCHEMAS.createUsageLimit,
|
|
4629
4629
|
async (params) => {
|
|
4630
4630
|
const result = await service.limits.createUsageLimit({
|
|
@@ -4657,7 +4657,7 @@ function registerLimitsTools(server, service) {
|
|
|
4657
4657
|
);
|
|
4658
4658
|
server.tool(
|
|
4659
4659
|
"update_usage_limit",
|
|
4660
|
-
"Update
|
|
4660
|
+
"Update a usage limit's name, credit_limit, alert_threshold, reset schedule, or reset target by id, unlike update_rate_limit which tunes request throttling. New values apply immediately to tracked usage, conditions and group_by are immutable after creation, and the call returns the updated id without clearing accumulated usage (use reset_usage_limit_entity for that).",
|
|
4661
4661
|
LIMITS_TOOL_SCHEMAS.updateUsageLimit,
|
|
4662
4662
|
async (params) => {
|
|
4663
4663
|
const result = await service.limits.updateUsageLimit(params.id, {
|
|
@@ -4686,7 +4686,7 @@ function registerLimitsTools(server, service) {
|
|
|
4686
4686
|
);
|
|
4687
4687
|
server.tool(
|
|
4688
4688
|
"delete_usage_limit",
|
|
4689
|
-
"Delete a usage limit
|
|
4689
|
+
"Delete a usage limit by id. This is permanent, removes the budget immediately, and clears tracked usage state; check list_usage_limit_entities first if you need impact.",
|
|
4690
4690
|
LIMITS_TOOL_SCHEMAS.deleteUsageLimit,
|
|
4691
4691
|
async (params) => {
|
|
4692
4692
|
await service.limits.deleteUsageLimit(params.id);
|
|
@@ -4709,7 +4709,7 @@ function registerLimitsTools(server, service) {
|
|
|
4709
4709
|
);
|
|
4710
4710
|
server.tool(
|
|
4711
4711
|
"list_usage_limit_entities",
|
|
4712
|
-
"List
|
|
4712
|
+
"List the entities currently tracked against a usage limit, including current usage. Use this to see who is near or over budget before reset_usage_limit_entity or delete_usage_limit.",
|
|
4713
4713
|
LIMITS_TOOL_SCHEMAS.listUsageLimitEntities,
|
|
4714
4714
|
async (params) => {
|
|
4715
4715
|
const result = await service.limits.listUsageLimitEntities(
|
|
@@ -4734,7 +4734,7 @@ function registerLimitsTools(server, service) {
|
|
|
4734
4734
|
);
|
|
4735
4735
|
server.tool(
|
|
4736
4736
|
"reset_usage_limit_entity",
|
|
4737
|
-
"Reset
|
|
4737
|
+
"Reset tracked usage for one entity under a usage limit. This changes accumulated usage for that entity only; use list_usage_limit_entities to confirm the target first.",
|
|
4738
4738
|
LIMITS_TOOL_SCHEMAS.resetUsageLimitEntity,
|
|
4739
4739
|
async (params) => {
|
|
4740
4740
|
await service.limits.resetUsageLimitEntity(
|
|
@@ -4851,7 +4851,7 @@ var LOGGING_TOOL_SCHEMAS = {
|
|
|
4851
4851
|
function registerLoggingTools(server, service) {
|
|
4852
4852
|
server.tool(
|
|
4853
4853
|
"insert_log",
|
|
4854
|
-
"Insert
|
|
4854
|
+
"Insert log records for requests that bypassed the gateway. This writes request, response, and trace metadata into Portkey immediately, and the call will fail if request_provider does not match a configured integration. Use the span fields to stitch trace hierarchies together.",
|
|
4855
4855
|
LOGGING_TOOL_SCHEMAS.insertLog,
|
|
4856
4856
|
async (params) => {
|
|
4857
4857
|
const entry = {
|
|
@@ -4899,7 +4899,7 @@ function registerLoggingTools(server, service) {
|
|
|
4899
4899
|
);
|
|
4900
4900
|
server.tool(
|
|
4901
4901
|
"create_log_export",
|
|
4902
|
-
"Create a
|
|
4902
|
+
"Create a log export definition with filters and requested fields. This only sets up the export and does not start processing; call start_log_export next, then use get_log_export or download_log_export to inspect or retrieve the finished result.",
|
|
4903
4903
|
LOGGING_TOOL_SCHEMAS.createLogExport,
|
|
4904
4904
|
async (params) => {
|
|
4905
4905
|
const result = await service.logging.createLogExport({
|
|
@@ -4937,7 +4937,7 @@ function registerLoggingTools(server, service) {
|
|
|
4937
4937
|
);
|
|
4938
4938
|
server.tool(
|
|
4939
4939
|
"list_log_exports",
|
|
4940
|
-
"List
|
|
4940
|
+
"List log export jobs in a workspace with status, filters, and timestamps. Use this to find an export_id before calling get_log_export, start_log_export, cancel_log_export, or download_log_export.",
|
|
4941
4941
|
LOGGING_TOOL_SCHEMAS.listLogExports,
|
|
4942
4942
|
async (params) => {
|
|
4943
4943
|
const result = await service.logging.listLogExports({
|
|
@@ -4972,7 +4972,7 @@ function registerLoggingTools(server, service) {
|
|
|
4972
4972
|
);
|
|
4973
4973
|
server.tool(
|
|
4974
4974
|
"get_log_export",
|
|
4975
|
-
"
|
|
4975
|
+
"Fetch one log export job by export_id and return its status, filters, requested fields, and file metadata. Use this when you already know the target; use list_log_exports for a workspace-wide overview.",
|
|
4976
4976
|
LOGGING_TOOL_SCHEMAS.getLogExport,
|
|
4977
4977
|
async (params) => {
|
|
4978
4978
|
const result = await service.logging.getLogExport(params.export_id);
|
|
@@ -5003,7 +5003,7 @@ function registerLoggingTools(server, service) {
|
|
|
5003
5003
|
);
|
|
5004
5004
|
server.tool(
|
|
5005
5005
|
"start_log_export",
|
|
5006
|
-
"
|
|
5006
|
+
"Start processing a previously created log export job. This is asynchronous, only queues the export, and does not return rows or a download file; use get_log_export to poll progress and download_log_export after the job completes.",
|
|
5007
5007
|
LOGGING_TOOL_SCHEMAS.startLogExport,
|
|
5008
5008
|
async (params) => {
|
|
5009
5009
|
const result = await service.logging.startLogExport(params.export_id);
|
|
@@ -5027,7 +5027,7 @@ function registerLoggingTools(server, service) {
|
|
|
5027
5027
|
);
|
|
5028
5028
|
server.tool(
|
|
5029
5029
|
"cancel_log_export",
|
|
5030
|
-
"Cancel a
|
|
5030
|
+
"Cancel a pending or running log export job, unlike start_log_export which queues one or delete_integration which removes the source. This permanently stops that export, takes effect immediately, and does not roll back already-processed rows; call create_log_export and start_log_export again to retry.",
|
|
5031
5031
|
LOGGING_TOOL_SCHEMAS.cancelLogExport,
|
|
5032
5032
|
async (params) => {
|
|
5033
5033
|
const result = await service.logging.cancelLogExport(params.export_id);
|
|
@@ -5051,7 +5051,7 @@ function registerLoggingTools(server, service) {
|
|
|
5051
5051
|
);
|
|
5052
5052
|
server.tool(
|
|
5053
5053
|
"download_log_export",
|
|
5054
|
-
"Get
|
|
5054
|
+
"Get a signed URL for downloading a completed log export. The export must already be finished; use get_log_export to confirm readiness and start_log_export if it has not run yet.",
|
|
5055
5055
|
LOGGING_TOOL_SCHEMAS.downloadLogExport,
|
|
5056
5056
|
async (params) => {
|
|
5057
5057
|
const result = await service.logging.downloadLogExport(params.export_id);
|
|
@@ -5075,7 +5075,7 @@ function registerLoggingTools(server, service) {
|
|
|
5075
5075
|
);
|
|
5076
5076
|
server.tool(
|
|
5077
5077
|
"update_log_export",
|
|
5078
|
-
"Update an existing log export configuration. Only
|
|
5078
|
+
"Update an existing log export configuration before or between export runs. Only workspace_id, time_of_generation_max, and requested_fields can change after creation, so use get_log_export to review the current job and start_log_export after the definition is ready.",
|
|
5079
5079
|
LOGGING_TOOL_SCHEMAS.updateLogExport,
|
|
5080
5080
|
async (params) => {
|
|
5081
5081
|
const updateData = {};
|
|
@@ -5242,7 +5242,7 @@ function formatMcpIntegrationWorkspace(workspace) {
|
|
|
5242
5242
|
function registerMcpIntegrationsTools(server, service) {
|
|
5243
5243
|
server.tool(
|
|
5244
5244
|
"list_mcp_integrations",
|
|
5245
|
-
"List
|
|
5245
|
+
"List MCP integrations in the organization. Returns paginated integration records plus total and has_more for discovering integration IDs; use get_mcp_integration for one integration's full Portkey-side config and list_mcp_servers for the servers under an integration.",
|
|
5246
5246
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrations,
|
|
5247
5247
|
async (params) => {
|
|
5248
5248
|
const result = await service.mcpIntegrations.listMcpIntegrations(params);
|
|
@@ -5266,7 +5266,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5266
5266
|
);
|
|
5267
5267
|
server.tool(
|
|
5268
5268
|
"create_mcp_integration",
|
|
5269
|
-
"Create
|
|
5269
|
+
"Create an MCP integration from an external server URL. Registers the Portkey-side connection and returns the new id and slug; if auth_type is headers, custom_headers are required, and you usually follow with create_mcp_server and capability updates.",
|
|
5270
5270
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.createMcpIntegration,
|
|
5271
5271
|
async (params) => {
|
|
5272
5272
|
if (params.auth_type === "headers" && (!params.custom_headers || Object.keys(params.custom_headers).length === 0)) {
|
|
@@ -5305,7 +5305,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5305
5305
|
);
|
|
5306
5306
|
server.tool(
|
|
5307
5307
|
"get_mcp_integration",
|
|
5308
|
-
"Retrieve
|
|
5308
|
+
"Retrieve one MCP integration by id or slug. Returns the full Portkey-side config, including auth type, transport, and masked configuration keys; use get_mcp_integration_metadata for the server's self-reported metadata.",
|
|
5309
5309
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.getMcpIntegration,
|
|
5310
5310
|
async (params) => {
|
|
5311
5311
|
const integration = await service.mcpIntegrations.getMcpIntegration(
|
|
@@ -5323,7 +5323,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5323
5323
|
);
|
|
5324
5324
|
server.tool(
|
|
5325
5325
|
"update_mcp_integration",
|
|
5326
|
-
"Update an
|
|
5326
|
+
"Update an MCP integration's name, description, URL, auth, or transport. Changes apply immediately and altering url or auth_type can break connected clients; use update_mcp_server when you only need to rename or re-describe a server.",
|
|
5327
5327
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegration,
|
|
5328
5328
|
async (params) => {
|
|
5329
5329
|
const { id, custom_headers, ...rest } = params;
|
|
@@ -5350,7 +5350,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5350
5350
|
);
|
|
5351
5351
|
server.tool(
|
|
5352
5352
|
"delete_mcp_integration",
|
|
5353
|
-
"Delete an MCP integration
|
|
5353
|
+
"Delete an MCP integration and all servers beneath it. This is irreversible, removes connected access immediately, and should only be used after confirming nothing depends on the integration.",
|
|
5354
5354
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.deleteMcpIntegration,
|
|
5355
5355
|
async (params) => {
|
|
5356
5356
|
await service.mcpIntegrations.deleteMcpIntegration(params.id);
|
|
@@ -5373,7 +5373,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5373
5373
|
);
|
|
5374
5374
|
server.tool(
|
|
5375
5375
|
"get_mcp_integration_metadata",
|
|
5376
|
-
"Retrieve server-reported metadata for an
|
|
5376
|
+
"Retrieve the external MCP server's self-reported metadata for an integration. Returns name, version, protocol, capability flags, and sync status; use get_mcp_integration for the Portkey-side connection config.",
|
|
5377
5377
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.getMcpIntegrationMetadata,
|
|
5378
5378
|
async (params) => {
|
|
5379
5379
|
const metadata = await service.mcpIntegrations.getMcpIntegrationMetadata(
|
|
@@ -5395,7 +5395,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5395
5395
|
);
|
|
5396
5396
|
server.tool(
|
|
5397
5397
|
"list_mcp_integration_capabilities",
|
|
5398
|
-
"List
|
|
5398
|
+
"List capabilities exposed by the external MCP server for an integration. Returns total plus enabled-state entries so you can decide what to toggle; use before update_mcp_integration_capabilities when you need to compare the current surface.",
|
|
5399
5399
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrationCapabilities,
|
|
5400
5400
|
async (params) => {
|
|
5401
5401
|
const result = await service.mcpIntegrations.listMcpIntegrationCapabilities(params.id);
|
|
@@ -5415,7 +5415,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5415
5415
|
);
|
|
5416
5416
|
server.tool(
|
|
5417
5417
|
"update_mcp_integration_capabilities",
|
|
5418
|
-
"Bulk enable or disable capabilities on an MCP integration
|
|
5418
|
+
"Bulk enable or disable capabilities on an MCP integration. Changes take effect immediately for connected users and hide or expose the selected tools, resources, and prompts; use list_mcp_integration_capabilities first if you need the current state.",
|
|
5419
5419
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegrationCapabilities,
|
|
5420
5420
|
async (params) => {
|
|
5421
5421
|
await service.mcpIntegrations.updateMcpIntegrationCapabilities(
|
|
@@ -5443,7 +5443,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5443
5443
|
);
|
|
5444
5444
|
server.tool(
|
|
5445
5445
|
"list_mcp_integration_workspaces",
|
|
5446
|
-
"List which workspaces
|
|
5446
|
+
"List which workspaces can access an MCP integration. Returns the global access mode plus per-workspace enablement for audit or permission review; use before update_mcp_integration_workspaces.",
|
|
5447
5447
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrationWorkspaces,
|
|
5448
5448
|
async (params) => {
|
|
5449
5449
|
const result = await service.mcpIntegrations.listMcpIntegrationWorkspaces(
|
|
@@ -5471,7 +5471,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5471
5471
|
);
|
|
5472
5472
|
server.tool(
|
|
5473
5473
|
"update_mcp_integration_workspaces",
|
|
5474
|
-
"Grant or revoke workspace access to an MCP integration in bulk. Changes
|
|
5474
|
+
"Grant or revoke workspace access to an MCP integration in bulk. Changes take effect immediately for all users in the selected workspaces; use list_mcp_integration_workspaces first to review the current access state.",
|
|
5475
5475
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegrationWorkspaces,
|
|
5476
5476
|
async (params) => {
|
|
5477
5477
|
await service.mcpIntegrations.updateMcpIntegrationWorkspaces(params.id, {
|
|
@@ -5586,7 +5586,7 @@ function formatMcpServerUserAccess(user) {
|
|
|
5586
5586
|
function registerMcpServersTools(server, service) {
|
|
5587
5587
|
server.tool(
|
|
5588
5588
|
"list_mcp_servers",
|
|
5589
|
-
"List
|
|
5589
|
+
"List MCP servers in the organization. Returns paginated server records plus total for discovering server IDs; use get_mcp_server for one server's details and list_mcp_integrations for the parent integration.",
|
|
5590
5590
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServers,
|
|
5591
5591
|
async (params) => {
|
|
5592
5592
|
const result = await service.mcpServers.listMcpServers(params);
|
|
@@ -5609,7 +5609,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5609
5609
|
);
|
|
5610
5610
|
server.tool(
|
|
5611
5611
|
"create_mcp_server",
|
|
5612
|
-
"
|
|
5612
|
+
"Create an MCP server under an existing integration. Registers the server and returns the new id and slug; use list_mcp_integrations first to find the parent integration, then capabilities or access tools to configure it.",
|
|
5613
5613
|
MCP_SERVERS_TOOL_SCHEMAS.createMcpServer,
|
|
5614
5614
|
async (params) => {
|
|
5615
5615
|
const result = await service.mcpServers.createMcpServer(params);
|
|
@@ -5633,7 +5633,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5633
5633
|
);
|
|
5634
5634
|
server.tool(
|
|
5635
5635
|
"get_mcp_server",
|
|
5636
|
-
"Retrieve
|
|
5636
|
+
"Retrieve one MCP server by id or slug. Returns server details including the parent integration, status, and created time; use get_mcp_server when you need the server record rather than the integration config.",
|
|
5637
5637
|
MCP_SERVERS_TOOL_SCHEMAS.getMcpServer,
|
|
5638
5638
|
async (params) => {
|
|
5639
5639
|
const mcpServer = await service.mcpServers.getMcpServer(params.id);
|
|
@@ -5649,7 +5649,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5649
5649
|
);
|
|
5650
5650
|
server.tool(
|
|
5651
5651
|
"update_mcp_server",
|
|
5652
|
-
"Update an
|
|
5652
|
+
"Update an MCP server's name or description. Changes apply immediately, but URL and auth live on the parent integration, so use update_mcp_integration for those fields.",
|
|
5653
5653
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServer,
|
|
5654
5654
|
async (params) => {
|
|
5655
5655
|
const { id, ...data } = params;
|
|
@@ -5673,7 +5673,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5673
5673
|
);
|
|
5674
5674
|
server.tool(
|
|
5675
5675
|
"delete_mcp_server",
|
|
5676
|
-
"Delete an MCP server instance
|
|
5676
|
+
"Delete an MCP server instance. This is irreversible, removes connected users' access immediately, and should be used only after confirming no workflows depend on the server.",
|
|
5677
5677
|
MCP_SERVERS_TOOL_SCHEMAS.deleteMcpServer,
|
|
5678
5678
|
async (params) => {
|
|
5679
5679
|
await service.mcpServers.deleteMcpServer(params.id);
|
|
@@ -5696,7 +5696,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5696
5696
|
);
|
|
5697
5697
|
server.tool(
|
|
5698
5698
|
"test_mcp_server",
|
|
5699
|
-
"
|
|
5699
|
+
"Test connectivity to an MCP server. Sends a live check and returns success, response time, HTTP status, and any error; use this before changing configuration or when diagnosing reachability.",
|
|
5700
5700
|
MCP_SERVERS_TOOL_SCHEMAS.testMcpServer,
|
|
5701
5701
|
async (params) => {
|
|
5702
5702
|
const result = await service.mcpServers.testMcpServer(params.id);
|
|
@@ -5712,7 +5712,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5712
5712
|
);
|
|
5713
5713
|
server.tool(
|
|
5714
5714
|
"list_mcp_server_capabilities",
|
|
5715
|
-
"List
|
|
5715
|
+
"List capabilities exposed by an MCP server instance. Returns total plus the current tool, resource, and prompt surface; use this instead of the integration-level capability list when you need server-specific exposure.",
|
|
5716
5716
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServerCapabilities,
|
|
5717
5717
|
async (params) => {
|
|
5718
5718
|
const result = await service.mcpServers.listMcpServerCapabilities(
|
|
@@ -5734,7 +5734,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5734
5734
|
);
|
|
5735
5735
|
server.tool(
|
|
5736
5736
|
"update_mcp_server_capabilities",
|
|
5737
|
-
"Enable or disable
|
|
5737
|
+
"Enable or disable capabilities on an MCP server. Changes take effect immediately and override the integration-level settings for this server; use list_mcp_server_capabilities first to inspect the current surface.",
|
|
5738
5738
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerCapabilities,
|
|
5739
5739
|
async (params) => {
|
|
5740
5740
|
await service.mcpServers.updateMcpServerCapabilities(params.id, {
|
|
@@ -5759,7 +5759,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5759
5759
|
);
|
|
5760
5760
|
server.tool(
|
|
5761
5761
|
"list_mcp_server_user_access",
|
|
5762
|
-
"List per-user access
|
|
5762
|
+
"List per-user access for an MCP server. Returns the default access mode, override flags, and connection status so you can audit who can use it; use before update_mcp_server_user_access.",
|
|
5763
5763
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServerUserAccess,
|
|
5764
5764
|
async (params) => {
|
|
5765
5765
|
const result = await service.mcpServers.listMcpServerUserAccess(
|
|
@@ -5785,7 +5785,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5785
5785
|
);
|
|
5786
5786
|
server.tool(
|
|
5787
5787
|
"update_mcp_server_user_access",
|
|
5788
|
-
"Grant or revoke individual user access to an MCP server.
|
|
5788
|
+
"Grant or revoke individual user access to an MCP server. Changes take effect immediately and override the default access setting for the selected users; use list_mcp_server_user_access first if you need the current state.",
|
|
5789
5789
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerUserAccess,
|
|
5790
5790
|
async (params) => {
|
|
5791
5791
|
await service.mcpServers.updateMcpServerUserAccess(params.id, {
|
|
@@ -5850,7 +5850,7 @@ var PARTIALS_TOOL_SCHEMAS = {
|
|
|
5850
5850
|
function registerPartialsTools(server, service) {
|
|
5851
5851
|
server.tool(
|
|
5852
5852
|
"create_prompt_partial",
|
|
5853
|
-
"Create a
|
|
5853
|
+
"Create a reusable prompt partial for inclusion with {{> partial_name}}. Use this for shared snippets or macros; returns the partial id, slug, and version id, and the new version stays inactive until published.",
|
|
5854
5854
|
PARTIALS_TOOL_SCHEMAS.createPromptPartial,
|
|
5855
5855
|
async (params) => {
|
|
5856
5856
|
const result = await service.partials.createPromptPartial({
|
|
@@ -5880,7 +5880,7 @@ function registerPartialsTools(server, service) {
|
|
|
5880
5880
|
);
|
|
5881
5881
|
server.tool(
|
|
5882
5882
|
"list_prompt_partials",
|
|
5883
|
-
"List
|
|
5883
|
+
"List partials across collections, with optional collection filtering. Returns ids, slugs, names, collections, and status so you can choose a prompt_partial_id before get_prompt_partial, update_prompt_partial, delete_prompt_partial, or publish_partial.",
|
|
5884
5884
|
PARTIALS_TOOL_SCHEMAS.listPromptPartials,
|
|
5885
5885
|
async (params) => {
|
|
5886
5886
|
const partials = await service.partials.listPromptPartials(params);
|
|
@@ -5911,7 +5911,7 @@ function registerPartialsTools(server, service) {
|
|
|
5911
5911
|
);
|
|
5912
5912
|
server.tool(
|
|
5913
5913
|
"get_prompt_partial",
|
|
5914
|
-
"
|
|
5914
|
+
"Fetch a partial's content and current version details. Use this before embedding, updating, or checking what {{> partial_name}} resolves to; returns the stored string plus version metadata.",
|
|
5915
5915
|
PARTIALS_TOOL_SCHEMAS.getPromptPartial,
|
|
5916
5916
|
async (params) => {
|
|
5917
5917
|
const partial = await service.partials.getPromptPartial(
|
|
@@ -5945,7 +5945,7 @@ function registerPartialsTools(server, service) {
|
|
|
5945
5945
|
);
|
|
5946
5946
|
server.tool(
|
|
5947
5947
|
"update_prompt_partial",
|
|
5948
|
-
"
|
|
5948
|
+
"Create a new version of a partial by updating its content or metadata. Only provided fields change, and the new version stays inactive until publish_partial makes it current.",
|
|
5949
5949
|
PARTIALS_TOOL_SCHEMAS.updatePromptPartial,
|
|
5950
5950
|
async (params) => {
|
|
5951
5951
|
const { prompt_partial_id, ...updateData } = params;
|
|
@@ -5972,7 +5972,7 @@ function registerPartialsTools(server, service) {
|
|
|
5972
5972
|
);
|
|
5973
5973
|
server.tool(
|
|
5974
5974
|
"delete_prompt_partial",
|
|
5975
|
-
"Delete a prompt partial by ID. This
|
|
5975
|
+
"Delete a prompt partial by ID. This cannot be undone, and prompts that reference it with {{> name}} will fail to render until you replace the reference.",
|
|
5976
5976
|
PARTIALS_TOOL_SCHEMAS.deletePromptPartial,
|
|
5977
5977
|
async (params) => {
|
|
5978
5978
|
await service.partials.deletePromptPartial(params.prompt_partial_id);
|
|
@@ -5995,7 +5995,7 @@ function registerPartialsTools(server, service) {
|
|
|
5995
5995
|
);
|
|
5996
5996
|
server.tool(
|
|
5997
5997
|
"list_partial_versions",
|
|
5998
|
-
"List all versions
|
|
5998
|
+
"List all versions for one partial, including version numbers, descriptions, status, and timestamps. Use this when you need history or want to choose a version_id before publish_partial.",
|
|
5999
5999
|
PARTIALS_TOOL_SCHEMAS.listPartialVersions,
|
|
6000
6000
|
async (params) => {
|
|
6001
6001
|
const versions = await service.partials.listPartialVersions(
|
|
@@ -6030,7 +6030,7 @@ function registerPartialsTools(server, service) {
|
|
|
6030
6030
|
);
|
|
6031
6031
|
server.tool(
|
|
6032
6032
|
"publish_partial",
|
|
6033
|
-
"Publish a specific version
|
|
6033
|
+
"Publish a specific partial version as the default, unlike update_prompt_partial which creates a new draft without activating it. Use after list_partial_versions to pick a version_id; this immediately changes what {{> partial_name}} resolves to for all prompts and replaces the previously active version without a rollback path.",
|
|
6034
6034
|
PARTIALS_TOOL_SCHEMAS.publishPartial,
|
|
6035
6035
|
async (params) => {
|
|
6036
6036
|
await service.partials.publishPartial(params.prompt_partial_id, {
|
|
@@ -6355,14 +6355,7 @@ function formatPromptListResponse(prompts, params) {
|
|
|
6355
6355
|
function registerPromptsTools(server, service) {
|
|
6356
6356
|
server.tool(
|
|
6357
6357
|
"create_prompt",
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
IMPORTANT: The "string" parameter accepts TWO legacy formats:
|
|
6361
|
-
1. Plain text: "Hello {{name}}, how can I help?"
|
|
6362
|
-
2. Multi-message JSON array (MUST be a JSON-encoded string):
|
|
6363
|
-
'[{"role":"system","content":[{"type":"text","text":"You are a helpful assistant."}]},{"role":"user","content":[{"type":"text","text":"{{user_input}}"}]}]'
|
|
6364
|
-
|
|
6365
|
-
For structured prompts, prefer the "messages" alias and let the server serialize it to the legacy string format.`,
|
|
6358
|
+
"Create a new prompt template and initial version. Use this for first-time setup; use migrate_prompt for idempotent CI/CD flows. Accepts plain text or structured chat messages, creates a new version immediately, and returns the prompt id, slug, and version id. For multi-message chat prompts pass messages (preferred) or a JSON-encoded array as string.",
|
|
6366
6359
|
PROMPTS_TOOL_SCHEMAS.createPrompt,
|
|
6367
6360
|
async (params) => {
|
|
6368
6361
|
if (!params.model && !params.ai_model_id && !params.finetune_id) {
|
|
@@ -6449,7 +6442,7 @@ For structured prompts, prefer the "messages" alias and let the server serialize
|
|
|
6449
6442
|
);
|
|
6450
6443
|
server.tool(
|
|
6451
6444
|
"list_prompts",
|
|
6452
|
-
"List
|
|
6445
|
+
"List prompts across the workspace, with optional collection, workspace, or search filters. Returns a paginated summary with id, name, slug, model, and status so you can choose a prompt_id before get_prompt, update_prompt, or render_prompt.",
|
|
6453
6446
|
PROMPTS_TOOL_SCHEMAS.listPrompts,
|
|
6454
6447
|
async (params) => {
|
|
6455
6448
|
const prompts = await service.prompts.listPrompts(params);
|
|
@@ -6469,12 +6462,7 @@ For structured prompts, prefer the "messages" alias and let the server serialize
|
|
|
6469
6462
|
);
|
|
6470
6463
|
server.tool(
|
|
6471
6464
|
"get_prompt",
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
The template field shows the raw "string" value stored in Portkey:
|
|
6475
|
-
- If it starts with "[", it is a JSON-encoded messages array (multi-message prompt with roles).
|
|
6476
|
-
- Otherwise it is a plain string template.
|
|
6477
|
-
When updating a prompt, pass the same format back in the "string" field of update_prompt.`,
|
|
6465
|
+
"Fetch a prompt's full definition, active version, and version history. Use this before updating, publishing, rendering, or copying a prompt when you need the stored template and metadata. For multi-message chat prompts pass messages (preferred) or a JSON-encoded array as string.",
|
|
6478
6466
|
PROMPTS_TOOL_SCHEMAS.getPrompt,
|
|
6479
6467
|
async (params) => {
|
|
6480
6468
|
const prompt = await service.prompts.getPrompt(params.prompt_id);
|
|
@@ -6536,14 +6524,7 @@ When updating a prompt, pass the same format back in the "string" field of updat
|
|
|
6536
6524
|
);
|
|
6537
6525
|
server.tool(
|
|
6538
6526
|
"update_prompt",
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
IMPORTANT: The legacy "string" parameter accepts the same two formats as create_prompt:
|
|
6542
|
-
1. Plain text: "Hello {{name}}"
|
|
6543
|
-
2. Multi-message JSON array (MUST be a JSON-encoded string):
|
|
6544
|
-
'[{"role":"system","content":[{"type":"text","text":"..."}]},{"role":"user","content":[{"type":"text","text":"{{input}}"}]}]'
|
|
6545
|
-
|
|
6546
|
-
For structured chat prompts, prefer the "messages" alias and let the server serialize it for you. New versions are created in "archived" status \u2014 use publish_prompt to make active.`,
|
|
6527
|
+
"Update an existing prompt and create a new archived version. Only provided fields change, and publish_prompt is what makes the new version active. For multi-message chat prompts pass messages (preferred) or a JSON-encoded array as string.",
|
|
6547
6528
|
PROMPTS_TOOL_SCHEMAS.updatePrompt,
|
|
6548
6529
|
async (params) => {
|
|
6549
6530
|
const { prompt_id, dry_run, messages, ...updateData } = params;
|
|
@@ -6608,7 +6589,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6608
6589
|
);
|
|
6609
6590
|
server.tool(
|
|
6610
6591
|
"delete_prompt",
|
|
6611
|
-
"Delete a prompt and all its versions by
|
|
6592
|
+
"Delete a prompt and all its versions by id. This cannot be undone, immediately breaks callers using the slug, and should only be used after checking list_prompt_versions or confirming you do not need an audit trail.",
|
|
6612
6593
|
PROMPTS_TOOL_SCHEMAS.deletePrompt,
|
|
6613
6594
|
async (params) => {
|
|
6614
6595
|
await service.prompts.deletePrompt(params.prompt_id);
|
|
@@ -6631,7 +6612,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6631
6612
|
);
|
|
6632
6613
|
server.tool(
|
|
6633
6614
|
"publish_prompt",
|
|
6634
|
-
"Publish a specific version of a prompt
|
|
6615
|
+
"Publish a specific version of a prompt as the active default, unlike promote_prompt which copies across environments or update_prompt which creates a new draft. This immediately routes all callers using the slug to that version and there is no rollback, so use list_prompt_versions to pick the version and update_prompt first if you need to create new content before promoting it.",
|
|
6635
6616
|
PROMPTS_TOOL_SCHEMAS.publishPrompt,
|
|
6636
6617
|
async (params) => {
|
|
6637
6618
|
await service.prompts.publishPrompt(params.prompt_id, {
|
|
@@ -6658,7 +6639,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6658
6639
|
);
|
|
6659
6640
|
server.tool(
|
|
6660
6641
|
"list_prompt_versions",
|
|
6661
|
-
"List all versions of
|
|
6642
|
+
"List all versions of one prompt, including version number, description, status, label, and a short template preview. Use this for history or to choose a version_id before publish_prompt or update_prompt_version.",
|
|
6662
6643
|
PROMPTS_TOOL_SCHEMAS.listPromptVersions,
|
|
6663
6644
|
async (params) => {
|
|
6664
6645
|
const versions = await service.prompts.listPromptVersions(
|
|
@@ -6696,7 +6677,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6696
6677
|
);
|
|
6697
6678
|
server.tool(
|
|
6698
6679
|
"render_prompt",
|
|
6699
|
-
"Render a prompt
|
|
6680
|
+
"Render a prompt by substituting variables and returning the final messages without calling the model. Use this to verify template output before a completion; run_prompt_completion is the tool that actually invokes the model.",
|
|
6700
6681
|
PROMPTS_TOOL_SCHEMAS.renderPrompt,
|
|
6701
6682
|
async (params) => {
|
|
6702
6683
|
const result = await service.prompts.renderPrompt(params.prompt_id, {
|
|
@@ -6728,7 +6709,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6728
6709
|
);
|
|
6729
6710
|
server.tool(
|
|
6730
6711
|
"run_prompt_completion",
|
|
6731
|
-
"Execute a prompt
|
|
6712
|
+
"Execute a prompt against the configured model and return the completion. This makes a billable model call, so use render_prompt first when you want to check the template and validate_completion_metadata when billing fields are uncertain.",
|
|
6732
6713
|
PROMPTS_TOOL_SCHEMAS.runPromptCompletion,
|
|
6733
6714
|
async (params) => {
|
|
6734
6715
|
const result = await service.prompts.runPromptCompletion(
|
|
@@ -6767,7 +6748,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6767
6748
|
);
|
|
6768
6749
|
server.tool(
|
|
6769
6750
|
"migrate_prompt",
|
|
6770
|
-
"Create or update a prompt
|
|
6751
|
+
"Create or update a prompt in one idempotent step for CI/CD and prompt-as-code flows. Finds existing prompts by name within the collection, stores app/env in template_metadata, and supports dry_run for safe preflight checks.",
|
|
6771
6752
|
PROMPTS_TOOL_SCHEMAS.migratePrompt,
|
|
6772
6753
|
async (params) => {
|
|
6773
6754
|
const templateString = normalizePromptTemplateString(params);
|
|
@@ -6821,7 +6802,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6821
6802
|
);
|
|
6822
6803
|
server.tool(
|
|
6823
6804
|
"promote_prompt",
|
|
6824
|
-
"
|
|
6805
|
+
"Copy a prompt from one environment to another and create or update the target automatically. Use this for staged releases when you want the target prompt synchronized without manual edits, and it returns both source and target version ids.",
|
|
6825
6806
|
PROMPTS_TOOL_SCHEMAS.promotePrompt,
|
|
6826
6807
|
async (params) => {
|
|
6827
6808
|
const result = await service.prompts.promotePrompt({
|
|
@@ -6859,7 +6840,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6859
6840
|
);
|
|
6860
6841
|
server.tool(
|
|
6861
6842
|
"validate_completion_metadata",
|
|
6862
|
-
"
|
|
6843
|
+
"Preflight billing metadata before run_prompt_completion. Validates required fields and values without making changes, so you can catch attribution errors before paying for the call.",
|
|
6863
6844
|
PROMPTS_TOOL_SCHEMAS.validateCompletionMetadata,
|
|
6864
6845
|
async (params) => {
|
|
6865
6846
|
const result = service.prompts.validateBillingMetadata(params);
|
|
@@ -6884,7 +6865,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6884
6865
|
);
|
|
6885
6866
|
server.tool(
|
|
6886
6867
|
"get_prompt_version",
|
|
6887
|
-
"Retrieve a specific version
|
|
6868
|
+
"Retrieve a specific prompt version by its version UUID. Use list_prompt_versions to find the id first; returns the template, parameters, and model config for that version.",
|
|
6888
6869
|
PROMPTS_TOOL_SCHEMAS.getPromptVersion,
|
|
6889
6870
|
async (params) => {
|
|
6890
6871
|
const version = await service.prompts.getPromptVersion(
|
|
@@ -6903,7 +6884,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6903
6884
|
);
|
|
6904
6885
|
server.tool(
|
|
6905
6886
|
"update_prompt_version",
|
|
6906
|
-
"Update a specific prompt version.
|
|
6887
|
+
"Update a specific prompt version's label assignment. This only assigns or removes a label, and null clears the label after you look up ids with list_prompt_labels.",
|
|
6907
6888
|
PROMPTS_TOOL_SCHEMAS.updatePromptVersion,
|
|
6908
6889
|
async (params) => {
|
|
6909
6890
|
if (params.label_id === void 0) {
|
|
@@ -7011,7 +6992,7 @@ var PROVIDERS_TOOL_SCHEMAS = {
|
|
|
7011
6992
|
function registerProvidersTools(server, service) {
|
|
7012
6993
|
server.tool(
|
|
7013
6994
|
"list_providers",
|
|
7014
|
-
"List workspace-scoped
|
|
6995
|
+
"List workspace-scoped provider instances and their limits or status. Use this to find provider slugs for workspace-level updates; use list_integrations for the org-level source connection. Returns total plus provider name, slug, integration, status, limits, expiration, and reset flags.",
|
|
7015
6996
|
PROVIDERS_TOOL_SCHEMAS.listProviders,
|
|
7016
6997
|
async (params) => {
|
|
7017
6998
|
const providers = await service.providers.listProviders({
|
|
@@ -7057,7 +7038,7 @@ function registerProvidersTools(server, service) {
|
|
|
7057
7038
|
);
|
|
7058
7039
|
server.tool(
|
|
7059
7040
|
"create_provider",
|
|
7060
|
-
"Create a workspace
|
|
7041
|
+
"Create a workspace provider backed by an org integration. The provider inherits the integration key, but its limits and expiration are enforced independently for that workspace. Returns the new provider id and slug.",
|
|
7061
7042
|
PROVIDERS_TOOL_SCHEMAS.createProvider,
|
|
7062
7043
|
async (params) => {
|
|
7063
7044
|
const result = await service.providers.createProvider({
|
|
@@ -7098,7 +7079,7 @@ function registerProvidersTools(server, service) {
|
|
|
7098
7079
|
);
|
|
7099
7080
|
server.tool(
|
|
7100
7081
|
"get_provider",
|
|
7101
|
-
"
|
|
7082
|
+
"Fetch one provider by slug, including limits, rate settings, expiration, and reset status. Use this to check consumption or audit configuration before updating.",
|
|
7102
7083
|
PROVIDERS_TOOL_SCHEMAS.getProvider,
|
|
7103
7084
|
async (params) => {
|
|
7104
7085
|
const provider = await service.providers.getProvider(
|
|
@@ -7140,7 +7121,7 @@ function registerProvidersTools(server, service) {
|
|
|
7140
7121
|
);
|
|
7141
7122
|
server.tool(
|
|
7142
7123
|
"update_provider",
|
|
7143
|
-
"Update a provider's
|
|
7124
|
+
"Update a provider's metadata, limits, or expiration. reset_usage clears accumulated usage counters immediately, so use it only when you intend to reset quota tracking. Returns the updated provider id and slug.",
|
|
7144
7125
|
PROVIDERS_TOOL_SCHEMAS.updateProvider,
|
|
7145
7126
|
async (params) => {
|
|
7146
7127
|
const result = await service.providers.updateProvider(
|
|
@@ -7183,7 +7164,7 @@ function registerProvidersTools(server, service) {
|
|
|
7183
7164
|
);
|
|
7184
7165
|
server.tool(
|
|
7185
7166
|
"delete_provider",
|
|
7186
|
-
"Delete a workspace
|
|
7167
|
+
"Delete a workspace provider by slug. This is irreversible and will break prompts, configs, and virtual keys that reference it; use delete_integration for the org source instead. Returns success after the provider is removed.",
|
|
7187
7168
|
PROVIDERS_TOOL_SCHEMAS.deleteProvider,
|
|
7188
7169
|
async (params) => {
|
|
7189
7170
|
await service.providers.deleteProvider(params.slug, params.workspace_id);
|
|
@@ -7235,7 +7216,7 @@ var TRACING_TOOL_SCHEMAS = {
|
|
|
7235
7216
|
function registerTracingTools(server, service) {
|
|
7236
7217
|
server.tool(
|
|
7237
7218
|
"create_feedback",
|
|
7238
|
-
"Create feedback for a
|
|
7219
|
+
"Create feedback for a trace or request. Writes a new feedback record linked by trace_id, returns the created feedback IDs and status, and takes effect immediately; use update_feedback when correcting an existing record.",
|
|
7239
7220
|
TRACING_TOOL_SCHEMAS.createFeedback,
|
|
7240
7221
|
async (params) => {
|
|
7241
7222
|
const result = await service.tracing.createFeedback({
|
|
@@ -7264,7 +7245,7 @@ function registerTracingTools(server, service) {
|
|
|
7264
7245
|
);
|
|
7265
7246
|
server.tool(
|
|
7266
7247
|
"update_feedback",
|
|
7267
|
-
"Update existing feedback by ID.
|
|
7248
|
+
"Update an existing feedback record by ID. Returns the updated status and feedback IDs, changes only value, weight, and metadata, and leaves the trace linkage immutable; use create_feedback only for a new record.",
|
|
7268
7249
|
TRACING_TOOL_SCHEMAS.updateFeedback,
|
|
7269
7250
|
async (params) => {
|
|
7270
7251
|
const result = await service.tracing.updateFeedback(params.id, {
|
|
@@ -7393,7 +7374,7 @@ function formatUserAnalyticsGroup(group) {
|
|
|
7393
7374
|
function registerUsersTools(server, service) {
|
|
7394
7375
|
server.tool(
|
|
7395
7376
|
"list_all_users",
|
|
7396
|
-
"List
|
|
7377
|
+
"List accepted org users with id, name, email, role, and timestamps. Use this to find a user_id before get_user, update_user, delete_user, or add_workspace_member; use list_user_invites for pending invitations.",
|
|
7397
7378
|
USERS_TOOL_SCHEMAS.listAllUsers,
|
|
7398
7379
|
async () => {
|
|
7399
7380
|
const users = await service.users.listUsers();
|
|
@@ -7416,7 +7397,7 @@ function registerUsersTools(server, service) {
|
|
|
7416
7397
|
);
|
|
7417
7398
|
server.tool(
|
|
7418
7399
|
"invite_user",
|
|
7419
|
-
"Invite a new user
|
|
7400
|
+
"Invite a new org user and optionally provision workspace access and an API key in one call. Workspace assignments apply only after acceptance; use add_workspace_member or update_workspace_member later for follow-up changes.",
|
|
7420
7401
|
USERS_TOOL_SCHEMAS.inviteUser,
|
|
7421
7402
|
async (params) => {
|
|
7422
7403
|
const result = await service.users.inviteUser(params);
|
|
@@ -7440,7 +7421,7 @@ function registerUsersTools(server, service) {
|
|
|
7440
7421
|
);
|
|
7441
7422
|
server.tool(
|
|
7442
7423
|
"get_user_stats",
|
|
7443
|
-
"
|
|
7424
|
+
"Return per-user request and cost analytics for a required time range. This is usage-by-user, not population metrics; use get_users_analytics for active-user or cohort trends.",
|
|
7444
7425
|
USERS_TOOL_SCHEMAS.getUserStats,
|
|
7445
7426
|
async (params) => {
|
|
7446
7427
|
const stats = await service.users.getUserGroupedData(params);
|
|
@@ -7463,7 +7444,7 @@ function registerUsersTools(server, service) {
|
|
|
7463
7444
|
);
|
|
7464
7445
|
server.tool(
|
|
7465
7446
|
"get_user",
|
|
7466
|
-
"
|
|
7447
|
+
"Get one accepted user by id and return their profile, role, and timestamps. Use list_all_users to find the id if you only have a name or email, and get_user_invite for pending invitations.",
|
|
7467
7448
|
USERS_TOOL_SCHEMAS.getUser,
|
|
7468
7449
|
async (params) => {
|
|
7469
7450
|
const user = await service.users.getUser(params.user_id);
|
|
@@ -7479,7 +7460,7 @@ function registerUsersTools(server, service) {
|
|
|
7479
7460
|
);
|
|
7480
7461
|
server.tool(
|
|
7481
7462
|
"update_user",
|
|
7482
|
-
"Update a user's first name, last name, or organization role
|
|
7463
|
+
"Update a user's first name, last name, or organization role by id. Email and workspace roles are not editable here; use update_workspace_member for workspace membership changes.",
|
|
7483
7464
|
USERS_TOOL_SCHEMAS.updateUser,
|
|
7484
7465
|
async (params) => {
|
|
7485
7466
|
const { user_id, ...updateData } = params;
|
|
@@ -7503,7 +7484,7 @@ function registerUsersTools(server, service) {
|
|
|
7503
7484
|
);
|
|
7504
7485
|
server.tool(
|
|
7505
7486
|
"delete_user",
|
|
7506
|
-
"
|
|
7487
|
+
"Delete a user from the org by id. This is permanent, removes org and workspace memberships, revokes API keys, and ends active sessions; use delete_user_invite for pending invites instead.",
|
|
7507
7488
|
USERS_TOOL_SCHEMAS.deleteUser,
|
|
7508
7489
|
async (params) => {
|
|
7509
7490
|
await service.users.deleteUser(params.user_id);
|
|
@@ -7526,7 +7507,7 @@ function registerUsersTools(server, service) {
|
|
|
7526
7507
|
);
|
|
7527
7508
|
server.tool(
|
|
7528
7509
|
"list_user_invites",
|
|
7529
|
-
"List
|
|
7510
|
+
"List pending and sent invitations with id, email, role, status, and expiry. Use this to check invite state; use list_all_users for users who already accepted.",
|
|
7530
7511
|
USERS_TOOL_SCHEMAS.listUserInvites,
|
|
7531
7512
|
async () => {
|
|
7532
7513
|
const invites = await service.users.listUserInvites();
|
|
@@ -7549,7 +7530,7 @@ function registerUsersTools(server, service) {
|
|
|
7549
7530
|
);
|
|
7550
7531
|
server.tool(
|
|
7551
7532
|
"get_user_invite",
|
|
7552
|
-
"
|
|
7533
|
+
"Get one invitation by invite id and return its email, role, status, and expiry. Use this for pending invites only; use get_user for accepted users.",
|
|
7553
7534
|
USERS_TOOL_SCHEMAS.getUserInvite,
|
|
7554
7535
|
async (params) => {
|
|
7555
7536
|
const invite = await service.users.getUserInvite(params.invite_id);
|
|
@@ -7565,7 +7546,7 @@ function registerUsersTools(server, service) {
|
|
|
7565
7546
|
);
|
|
7566
7547
|
server.tool(
|
|
7567
7548
|
"delete_user_invite",
|
|
7568
|
-
"
|
|
7549
|
+
"Delete a pending invite and revoke its invite link. This does not affect existing users; use delete_user for full user removal.",
|
|
7569
7550
|
USERS_TOOL_SCHEMAS.deleteUserInvite,
|
|
7570
7551
|
async (params) => {
|
|
7571
7552
|
await service.users.deleteUserInvite(params.invite_id);
|
|
@@ -7588,7 +7569,7 @@ function registerUsersTools(server, service) {
|
|
|
7588
7569
|
);
|
|
7589
7570
|
server.tool(
|
|
7590
7571
|
"resend_user_invite",
|
|
7591
|
-
"Resend the
|
|
7572
|
+
"Resend the email for a pending invite that has not been accepted, unlike invite_user which creates a new invite. This sends a fresh email without modifying the invite record, expiry, or role; use get_user_invite first if you are unsure whether the invite still exists and list_user_invites to discover invite_ids.",
|
|
7592
7573
|
USERS_TOOL_SCHEMAS.resendUserInvite,
|
|
7593
7574
|
async (params) => {
|
|
7594
7575
|
await service.users.resendUserInvite(params.invite_id);
|
|
@@ -7718,7 +7699,7 @@ function formatWorkspaceDetail(workspace) {
|
|
|
7718
7699
|
function registerWorkspacesTools(server, service) {
|
|
7719
7700
|
server.tool(
|
|
7720
7701
|
"list_workspaces",
|
|
7721
|
-
"
|
|
7702
|
+
"List workspaces with id, name, slug, default settings, and timestamps. Use this to find a workspace_id before get_workspace, update_workspace, add_workspace_member, or remove_workspace_member.",
|
|
7722
7703
|
WORKSPACES_TOOL_SCHEMAS.listWorkspaces,
|
|
7723
7704
|
async (params) => {
|
|
7724
7705
|
const workspaces = await service.workspaces.listWorkspaces(params);
|
|
@@ -7741,7 +7722,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7741
7722
|
);
|
|
7742
7723
|
server.tool(
|
|
7743
7724
|
"get_workspace",
|
|
7744
|
-
"
|
|
7725
|
+
"Get one workspace by id and return its full details, including defaults and the complete member list. Use this when you need membership detail; use list_workspaces for an overview.",
|
|
7745
7726
|
WORKSPACES_TOOL_SCHEMAS.getWorkspace,
|
|
7746
7727
|
async (params) => {
|
|
7747
7728
|
const workspace = await service.workspaces.getWorkspace(
|
|
@@ -7759,7 +7740,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7759
7740
|
);
|
|
7760
7741
|
server.tool(
|
|
7761
7742
|
"create_workspace",
|
|
7762
|
-
"Create a
|
|
7743
|
+
"Create a workspace to isolate resources, API keys, and team members. If slug is omitted it is auto-generated from the name; returns the new workspace id, name, and slug.",
|
|
7763
7744
|
WORKSPACES_TOOL_SCHEMAS.createWorkspace,
|
|
7764
7745
|
async (params) => {
|
|
7765
7746
|
const workspace = await service.workspaces.createWorkspace({
|
|
@@ -7790,7 +7771,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7790
7771
|
);
|
|
7791
7772
|
server.tool(
|
|
7792
7773
|
"update_workspace",
|
|
7793
|
-
"Update a workspace's name, slug, description, default
|
|
7774
|
+
"Update a workspace's name, slug, description, default flag, or metadata by id, unlike update_workspace_member which changes role assignments within a workspace. Only provided fields change and updates take effect immediately; changing the slug can break URLs, API key references, and other external links, so confirm no dependencies first.",
|
|
7794
7775
|
WORKSPACES_TOOL_SCHEMAS.updateWorkspace,
|
|
7795
7776
|
async (params) => {
|
|
7796
7777
|
const { workspace_id, is_default, metadata, ...rest } = params;
|
|
@@ -7820,7 +7801,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7820
7801
|
);
|
|
7821
7802
|
server.tool(
|
|
7822
7803
|
"delete_workspace",
|
|
7823
|
-
"Delete a workspace
|
|
7804
|
+
"Delete a workspace by id. This is permanent and removes the workspace, its members, configs, API keys, and resources.",
|
|
7824
7805
|
WORKSPACES_TOOL_SCHEMAS.deleteWorkspace,
|
|
7825
7806
|
async (params) => {
|
|
7826
7807
|
await service.workspaces.deleteWorkspace(params.workspace_id);
|
|
@@ -7843,7 +7824,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7843
7824
|
);
|
|
7844
7825
|
server.tool(
|
|
7845
7826
|
"add_workspace_member",
|
|
7846
|
-
"Add an existing
|
|
7827
|
+
"Add an existing org user to a workspace with a role. Requires a UUID user_id; use list_all_users to find it, and invite_user first if the person is not yet in the org.",
|
|
7847
7828
|
WORKSPACES_TOOL_SCHEMAS.addWorkspaceMember,
|
|
7848
7829
|
async (params) => {
|
|
7849
7830
|
const member = await service.workspaces.addWorkspaceMember(
|
|
@@ -7872,7 +7853,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7872
7853
|
);
|
|
7873
7854
|
server.tool(
|
|
7874
7855
|
"list_workspace_members",
|
|
7875
|
-
"List
|
|
7856
|
+
"List every member in a workspace with organization role, workspace role, status, and timestamps. Use this to find a user_id before get_workspace_member, update_workspace_member, or remove_workspace_member.",
|
|
7876
7857
|
WORKSPACES_TOOL_SCHEMAS.listWorkspaceMembers,
|
|
7877
7858
|
async (params) => {
|
|
7878
7859
|
const members = await service.workspaces.listWorkspaceMembers(
|
|
@@ -7897,7 +7878,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7897
7878
|
);
|
|
7898
7879
|
server.tool(
|
|
7899
7880
|
"get_workspace_member",
|
|
7900
|
-
"Get
|
|
7881
|
+
"Get one workspace member by workspace_id and user_id. Use this when you already know both IDs; use list_workspace_members to browse the full roster.",
|
|
7901
7882
|
WORKSPACES_TOOL_SCHEMAS.getWorkspaceMember,
|
|
7902
7883
|
async (params) => {
|
|
7903
7884
|
const member = await service.workspaces.getWorkspaceMember(
|
|
@@ -7916,7 +7897,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7916
7897
|
);
|
|
7917
7898
|
server.tool(
|
|
7918
7899
|
"update_workspace_member",
|
|
7919
|
-
"Update a workspace member's role. Only the role
|
|
7900
|
+
"Update a workspace member's role by workspace_id and user_id. Only the role changes here; use list_workspace_members or get_workspace_member to confirm the current assignment first.",
|
|
7920
7901
|
WORKSPACES_TOOL_SCHEMAS.updateWorkspaceMember,
|
|
7921
7902
|
async (params) => {
|
|
7922
7903
|
const member = await service.workspaces.updateWorkspaceMember(
|
|
@@ -7945,7 +7926,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7945
7926
|
);
|
|
7946
7927
|
server.tool(
|
|
7947
7928
|
"remove_workspace_member",
|
|
7948
|
-
"Remove a user from a workspace
|
|
7929
|
+
"Remove a user from a workspace and revoke workspace access. This does not delete the user from the organization; use delete_user for full removal.",
|
|
7949
7930
|
WORKSPACES_TOOL_SCHEMAS.removeWorkspaceMember,
|
|
7950
7931
|
async (params) => {
|
|
7951
7932
|
await service.workspaces.removeWorkspaceMember(
|