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/server.js
CHANGED
|
@@ -1881,7 +1881,7 @@ function normalizeAnalyticsParams(params) {
|
|
|
1881
1881
|
function registerAnalyticsTools(server, service) {
|
|
1882
1882
|
server.tool(
|
|
1883
1883
|
"get_cost_analytics",
|
|
1884
|
-
"
|
|
1884
|
+
"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.",
|
|
1885
1885
|
baseAnalyticsSchema,
|
|
1886
1886
|
async (params) => {
|
|
1887
1887
|
const analytics = await service.analytics.getCostAnalytics(
|
|
@@ -1914,7 +1914,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1914
1914
|
);
|
|
1915
1915
|
server.tool(
|
|
1916
1916
|
"get_request_analytics",
|
|
1917
|
-
"
|
|
1917
|
+
"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.",
|
|
1918
1918
|
requestAnalyticsSchema,
|
|
1919
1919
|
async (params) => {
|
|
1920
1920
|
const analytics = await service.analytics.getRequestAnalytics(
|
|
@@ -1949,7 +1949,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1949
1949
|
);
|
|
1950
1950
|
server.tool(
|
|
1951
1951
|
"get_token_analytics",
|
|
1952
|
-
"
|
|
1952
|
+
"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.",
|
|
1953
1953
|
baseAnalyticsSchema,
|
|
1954
1954
|
async (params) => {
|
|
1955
1955
|
const analytics = await service.analytics.getTokenAnalytics(
|
|
@@ -1984,7 +1984,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
1984
1984
|
);
|
|
1985
1985
|
server.tool(
|
|
1986
1986
|
"get_latency_analytics",
|
|
1987
|
-
"
|
|
1987
|
+
"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.",
|
|
1988
1988
|
baseAnalyticsSchema,
|
|
1989
1989
|
async (params) => {
|
|
1990
1990
|
const analytics = await service.analytics.getLatencyAnalytics(
|
|
@@ -2021,7 +2021,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2021
2021
|
);
|
|
2022
2022
|
server.tool(
|
|
2023
2023
|
"get_error_analytics",
|
|
2024
|
-
"
|
|
2024
|
+
"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.",
|
|
2025
2025
|
baseAnalyticsSchema,
|
|
2026
2026
|
async (params) => {
|
|
2027
2027
|
const analytics = await service.analytics.getErrorAnalytics(
|
|
@@ -2052,7 +2052,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2052
2052
|
);
|
|
2053
2053
|
server.tool(
|
|
2054
2054
|
"get_error_rate_analytics",
|
|
2055
|
-
"
|
|
2055
|
+
"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.",
|
|
2056
2056
|
baseAnalyticsSchema,
|
|
2057
2057
|
async (params) => {
|
|
2058
2058
|
const analytics = await service.analytics.getErrorRateAnalytics(
|
|
@@ -2083,7 +2083,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2083
2083
|
);
|
|
2084
2084
|
server.tool(
|
|
2085
2085
|
"get_cache_hit_latency",
|
|
2086
|
-
"
|
|
2086
|
+
"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.",
|
|
2087
2087
|
baseAnalyticsSchema,
|
|
2088
2088
|
async (params) => {
|
|
2089
2089
|
const analytics = await service.analytics.getCacheHitLatency(
|
|
@@ -2116,7 +2116,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2116
2116
|
);
|
|
2117
2117
|
server.tool(
|
|
2118
2118
|
"get_cache_hit_rate",
|
|
2119
|
-
"
|
|
2119
|
+
"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.",
|
|
2120
2120
|
baseAnalyticsSchema,
|
|
2121
2121
|
async (params) => {
|
|
2122
2122
|
const analytics = await service.analytics.getCacheHitRate(
|
|
@@ -2151,7 +2151,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2151
2151
|
);
|
|
2152
2152
|
server.tool(
|
|
2153
2153
|
"get_users_analytics",
|
|
2154
|
-
"
|
|
2154
|
+
"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.",
|
|
2155
2155
|
baseAnalyticsSchema,
|
|
2156
2156
|
async (params) => {
|
|
2157
2157
|
const analytics = await service.analytics.getUsersAnalytics(
|
|
@@ -2184,7 +2184,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2184
2184
|
);
|
|
2185
2185
|
server.tool(
|
|
2186
2186
|
"get_error_stacks_analytics",
|
|
2187
|
-
"
|
|
2187
|
+
"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.",
|
|
2188
2188
|
baseAnalyticsSchema,
|
|
2189
2189
|
async (params) => {
|
|
2190
2190
|
const analytics = await service.analytics.getErrorStacksAnalytics(
|
|
@@ -2206,7 +2206,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2206
2206
|
);
|
|
2207
2207
|
server.tool(
|
|
2208
2208
|
"get_error_status_codes_analytics",
|
|
2209
|
-
"
|
|
2209
|
+
"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.",
|
|
2210
2210
|
baseAnalyticsSchema,
|
|
2211
2211
|
async (params) => {
|
|
2212
2212
|
const analytics = await service.analytics.getErrorStatusCodesAnalytics(
|
|
@@ -2228,7 +2228,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2228
2228
|
);
|
|
2229
2229
|
server.tool(
|
|
2230
2230
|
"get_user_requests_analytics",
|
|
2231
|
-
"
|
|
2231
|
+
"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.",
|
|
2232
2232
|
baseAnalyticsSchema,
|
|
2233
2233
|
async (params) => {
|
|
2234
2234
|
const analytics = await service.analytics.getUserRequestsAnalytics(
|
|
@@ -2250,7 +2250,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2250
2250
|
);
|
|
2251
2251
|
server.tool(
|
|
2252
2252
|
"get_rescued_requests_analytics",
|
|
2253
|
-
"
|
|
2253
|
+
"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.",
|
|
2254
2254
|
baseAnalyticsSchema,
|
|
2255
2255
|
async (params) => {
|
|
2256
2256
|
const analytics = await service.analytics.getRescuedRequestsAnalytics(
|
|
@@ -2272,7 +2272,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2272
2272
|
);
|
|
2273
2273
|
server.tool(
|
|
2274
2274
|
"get_feedback_analytics",
|
|
2275
|
-
"
|
|
2275
|
+
"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.",
|
|
2276
2276
|
baseAnalyticsSchema,
|
|
2277
2277
|
async (params) => {
|
|
2278
2278
|
const analytics = await service.analytics.getFeedbackAnalytics(
|
|
@@ -2294,7 +2294,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2294
2294
|
);
|
|
2295
2295
|
server.tool(
|
|
2296
2296
|
"get_feedback_models_analytics",
|
|
2297
|
-
"
|
|
2297
|
+
"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.",
|
|
2298
2298
|
baseAnalyticsSchema,
|
|
2299
2299
|
async (params) => {
|
|
2300
2300
|
const analytics = await service.analytics.getFeedbackModelsAnalytics(
|
|
@@ -2316,7 +2316,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2316
2316
|
);
|
|
2317
2317
|
server.tool(
|
|
2318
2318
|
"get_feedback_scores_analytics",
|
|
2319
|
-
"
|
|
2319
|
+
"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.",
|
|
2320
2320
|
baseAnalyticsSchema,
|
|
2321
2321
|
async (params) => {
|
|
2322
2322
|
const analytics = await service.analytics.getFeedbackScoresAnalytics(
|
|
@@ -2338,7 +2338,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2338
2338
|
);
|
|
2339
2339
|
server.tool(
|
|
2340
2340
|
"get_feedback_weighted_analytics",
|
|
2341
|
-
"
|
|
2341
|
+
"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.",
|
|
2342
2342
|
baseAnalyticsSchema,
|
|
2343
2343
|
async (params) => {
|
|
2344
2344
|
const analytics = await service.analytics.getFeedbackWeightedAnalytics(
|
|
@@ -2360,7 +2360,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2360
2360
|
);
|
|
2361
2361
|
server.tool(
|
|
2362
2362
|
"get_analytics_group_users",
|
|
2363
|
-
"
|
|
2363
|
+
"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.",
|
|
2364
2364
|
paginatedAnalyticsSchema,
|
|
2365
2365
|
async (params) => {
|
|
2366
2366
|
const analytics = await service.analytics.getAnalyticsGroupUsers(
|
|
@@ -2382,7 +2382,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2382
2382
|
);
|
|
2383
2383
|
server.tool(
|
|
2384
2384
|
"get_analytics_group_models",
|
|
2385
|
-
"
|
|
2385
|
+
"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.",
|
|
2386
2386
|
paginatedAnalyticsSchema,
|
|
2387
2387
|
async (params) => {
|
|
2388
2388
|
const analytics = await service.analytics.getAnalyticsGroupModels(
|
|
@@ -2404,7 +2404,7 @@ function registerAnalyticsTools(server, service) {
|
|
|
2404
2404
|
);
|
|
2405
2405
|
server.tool(
|
|
2406
2406
|
"get_analytics_group_metadata",
|
|
2407
|
-
"
|
|
2407
|
+
"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.",
|
|
2408
2408
|
analyticsGroupMetadataSchema,
|
|
2409
2409
|
async (params) => {
|
|
2410
2410
|
const { metadata_key, ...analyticsParams } = params;
|
|
@@ -2454,7 +2454,7 @@ var AUDIT_TOOL_SCHEMAS = {
|
|
|
2454
2454
|
function registerAuditTools(server, service) {
|
|
2455
2455
|
server.tool(
|
|
2456
2456
|
"list_audit_logs",
|
|
2457
|
-
"
|
|
2457
|
+
"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.",
|
|
2458
2458
|
AUDIT_TOOL_SCHEMAS.listAuditLogs,
|
|
2459
2459
|
async (params) => {
|
|
2460
2460
|
const result = await service.audit.listAuditLogs({
|
|
@@ -2534,7 +2534,7 @@ var COLLECTIONS_TOOL_SCHEMAS = {
|
|
|
2534
2534
|
function registerCollectionsTools(server, service) {
|
|
2535
2535
|
server.tool(
|
|
2536
2536
|
"list_collections",
|
|
2537
|
-
"List
|
|
2537
|
+
"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.",
|
|
2538
2538
|
COLLECTIONS_TOOL_SCHEMAS.listCollections,
|
|
2539
2539
|
async (params) => {
|
|
2540
2540
|
const collections = await service.collections.listCollections(params);
|
|
@@ -2564,7 +2564,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2564
2564
|
);
|
|
2565
2565
|
server.tool(
|
|
2566
2566
|
"create_collection",
|
|
2567
|
-
"Create a new prompt collection for organizing prompts by app. Use
|
|
2567
|
+
"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.",
|
|
2568
2568
|
COLLECTIONS_TOOL_SCHEMAS.createCollection,
|
|
2569
2569
|
async (params) => {
|
|
2570
2570
|
const result = await service.collections.createCollection(params);
|
|
@@ -2588,7 +2588,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2588
2588
|
);
|
|
2589
2589
|
server.tool(
|
|
2590
2590
|
"get_collection",
|
|
2591
|
-
"
|
|
2591
|
+
"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.",
|
|
2592
2592
|
COLLECTIONS_TOOL_SCHEMAS.getCollection,
|
|
2593
2593
|
async (params) => {
|
|
2594
2594
|
const collection = await service.collections.getCollection(
|
|
@@ -2617,7 +2617,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2617
2617
|
);
|
|
2618
2618
|
server.tool(
|
|
2619
2619
|
"update_collection",
|
|
2620
|
-
"Update a collection's
|
|
2620
|
+
"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.",
|
|
2621
2621
|
COLLECTIONS_TOOL_SCHEMAS.updateCollection,
|
|
2622
2622
|
async (params) => {
|
|
2623
2623
|
await service.collections.updateCollection(params.collection_id, {
|
|
@@ -2643,7 +2643,7 @@ function registerCollectionsTools(server, service) {
|
|
|
2643
2643
|
);
|
|
2644
2644
|
server.tool(
|
|
2645
2645
|
"delete_collection",
|
|
2646
|
-
"Delete a prompt collection by ID. This
|
|
2646
|
+
"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.",
|
|
2647
2647
|
COLLECTIONS_TOOL_SCHEMAS.deleteCollection,
|
|
2648
2648
|
async (params) => {
|
|
2649
2649
|
const result = await service.collections.deleteCollection(
|
|
@@ -2741,7 +2741,7 @@ function hasConfigSettings(config) {
|
|
|
2741
2741
|
function registerConfigsTools(server, service) {
|
|
2742
2742
|
server.tool(
|
|
2743
2743
|
"list_configs",
|
|
2744
|
-
"
|
|
2744
|
+
"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.",
|
|
2745
2745
|
CONFIGS_TOOL_SCHEMAS.listConfigs,
|
|
2746
2746
|
async () => {
|
|
2747
2747
|
const configs = await service.configs.listConfigs();
|
|
@@ -2775,7 +2775,7 @@ function registerConfigsTools(server, service) {
|
|
|
2775
2775
|
);
|
|
2776
2776
|
server.tool(
|
|
2777
2777
|
"get_config",
|
|
2778
|
-
"
|
|
2778
|
+
"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.",
|
|
2779
2779
|
CONFIGS_TOOL_SCHEMAS.getConfig,
|
|
2780
2780
|
async (params) => {
|
|
2781
2781
|
const response = await service.configs.getConfig(params.slug);
|
|
@@ -2819,7 +2819,7 @@ function registerConfigsTools(server, service) {
|
|
|
2819
2819
|
);
|
|
2820
2820
|
server.tool(
|
|
2821
2821
|
"create_config",
|
|
2822
|
-
"Create a
|
|
2822
|
+
"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.",
|
|
2823
2823
|
CONFIGS_TOOL_SCHEMAS.createConfig,
|
|
2824
2824
|
async (params) => {
|
|
2825
2825
|
const config = buildConfigPayload(params);
|
|
@@ -2859,7 +2859,7 @@ function registerConfigsTools(server, service) {
|
|
|
2859
2859
|
);
|
|
2860
2860
|
server.tool(
|
|
2861
2861
|
"update_config",
|
|
2862
|
-
"Update
|
|
2862
|
+
"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.",
|
|
2863
2863
|
CONFIGS_TOOL_SCHEMAS.updateConfig,
|
|
2864
2864
|
async (params) => {
|
|
2865
2865
|
const config = buildConfigPayload(params);
|
|
@@ -2894,7 +2894,7 @@ function registerConfigsTools(server, service) {
|
|
|
2894
2894
|
);
|
|
2895
2895
|
server.tool(
|
|
2896
2896
|
"delete_config",
|
|
2897
|
-
"Delete a
|
|
2897
|
+
"Delete a config by slug. This is permanent, removes all versions, and breaks anything still pointing at that slug; check list_config_versions first.",
|
|
2898
2898
|
CONFIGS_TOOL_SCHEMAS.deleteConfig,
|
|
2899
2899
|
async (params) => {
|
|
2900
2900
|
const result = await service.configs.deleteConfig(params.slug);
|
|
@@ -2917,7 +2917,7 @@ function registerConfigsTools(server, service) {
|
|
|
2917
2917
|
);
|
|
2918
2918
|
server.tool(
|
|
2919
2919
|
"list_config_versions",
|
|
2920
|
-
"List
|
|
2920
|
+
"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.",
|
|
2921
2921
|
CONFIGS_TOOL_SCHEMAS.listConfigVersions,
|
|
2922
2922
|
async (params) => {
|
|
2923
2923
|
const result = await service.configs.listConfigVersions(params.slug);
|
|
@@ -2999,7 +2999,7 @@ var GUARDRAILS_TOOL_SCHEMAS = {
|
|
|
2999
2999
|
function registerGuardrailsTools(server, service) {
|
|
3000
3000
|
server.tool(
|
|
3001
3001
|
"list_guardrails",
|
|
3002
|
-
"List
|
|
3002
|
+
"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.",
|
|
3003
3003
|
GUARDRAILS_TOOL_SCHEMAS.listGuardrails,
|
|
3004
3004
|
async (params) => {
|
|
3005
3005
|
const result = await service.guardrails.listGuardrails(params);
|
|
@@ -3033,7 +3033,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3033
3033
|
);
|
|
3034
3034
|
server.tool(
|
|
3035
3035
|
"get_guardrail",
|
|
3036
|
-
"
|
|
3036
|
+
"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.",
|
|
3037
3037
|
GUARDRAILS_TOOL_SCHEMAS.getGuardrail,
|
|
3038
3038
|
async (params) => {
|
|
3039
3039
|
const guardrail = await service.guardrails.getGuardrail(
|
|
@@ -3068,7 +3068,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3068
3068
|
);
|
|
3069
3069
|
server.tool(
|
|
3070
3070
|
"create_guardrail",
|
|
3071
|
-
"Create a
|
|
3071
|
+
"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.",
|
|
3072
3072
|
GUARDRAILS_TOOL_SCHEMAS.createGuardrail,
|
|
3073
3073
|
async (params) => {
|
|
3074
3074
|
const result = await service.guardrails.createGuardrail({
|
|
@@ -3099,7 +3099,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3099
3099
|
);
|
|
3100
3100
|
server.tool(
|
|
3101
3101
|
"update_guardrail",
|
|
3102
|
-
"Update
|
|
3102
|
+
"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.",
|
|
3103
3103
|
GUARDRAILS_TOOL_SCHEMAS.updateGuardrail,
|
|
3104
3104
|
async (params) => {
|
|
3105
3105
|
const updateData = {};
|
|
@@ -3137,7 +3137,7 @@ function registerGuardrailsTools(server, service) {
|
|
|
3137
3137
|
);
|
|
3138
3138
|
server.tool(
|
|
3139
3139
|
"delete_guardrail",
|
|
3140
|
-
"Delete a guardrail by
|
|
3140
|
+
"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.",
|
|
3141
3141
|
GUARDRAILS_TOOL_SCHEMAS.deleteGuardrail,
|
|
3142
3142
|
async (params) => {
|
|
3143
3143
|
const result = await service.guardrails.deleteGuardrail(
|
|
@@ -3300,7 +3300,7 @@ var INTEGRATIONS_TOOL_SCHEMAS = {
|
|
|
3300
3300
|
function registerIntegrationsTools(server, service) {
|
|
3301
3301
|
server.tool(
|
|
3302
3302
|
"list_integrations",
|
|
3303
|
-
"List org-level
|
|
3303
|
+
"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.",
|
|
3304
3304
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrations,
|
|
3305
3305
|
async (params) => {
|
|
3306
3306
|
const integrations = await service.integrations.listIntegrations({
|
|
@@ -3338,7 +3338,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3338
3338
|
);
|
|
3339
3339
|
server.tool(
|
|
3340
3340
|
"create_integration",
|
|
3341
|
-
"Create
|
|
3341
|
+
"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.",
|
|
3342
3342
|
INTEGRATIONS_TOOL_SCHEMAS.createIntegration,
|
|
3343
3343
|
async (params) => {
|
|
3344
3344
|
const configurations = {};
|
|
@@ -3386,7 +3386,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3386
3386
|
);
|
|
3387
3387
|
server.tool(
|
|
3388
3388
|
"get_integration",
|
|
3389
|
-
"
|
|
3389
|
+
"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.",
|
|
3390
3390
|
INTEGRATIONS_TOOL_SCHEMAS.getIntegration,
|
|
3391
3391
|
async (params) => {
|
|
3392
3392
|
const integration = await service.integrations.getIntegration(
|
|
@@ -3423,7 +3423,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3423
3423
|
);
|
|
3424
3424
|
server.tool(
|
|
3425
3425
|
"update_integration",
|
|
3426
|
-
"Update an
|
|
3426
|
+
"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.",
|
|
3427
3427
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegration,
|
|
3428
3428
|
async (params) => {
|
|
3429
3429
|
const configurations = {};
|
|
@@ -3470,7 +3470,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3470
3470
|
);
|
|
3471
3471
|
server.tool(
|
|
3472
3472
|
"delete_integration",
|
|
3473
|
-
"Delete an integration by slug. This
|
|
3473
|
+
"Delete an integration by slug. This is irreversible and stops the org-level connection, which will break dependent virtual keys, providers, and workspace access.",
|
|
3474
3474
|
INTEGRATIONS_TOOL_SCHEMAS.deleteIntegration,
|
|
3475
3475
|
async (params) => {
|
|
3476
3476
|
const result = await service.integrations.deleteIntegration(params.slug);
|
|
@@ -3493,7 +3493,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3493
3493
|
);
|
|
3494
3494
|
server.tool(
|
|
3495
3495
|
"list_integration_models",
|
|
3496
|
-
"List
|
|
3496
|
+
"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.",
|
|
3497
3497
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrationModels,
|
|
3498
3498
|
async (params) => {
|
|
3499
3499
|
const models = await service.integrations.listIntegrationModels(
|
|
@@ -3531,7 +3531,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3531
3531
|
);
|
|
3532
3532
|
server.tool(
|
|
3533
3533
|
"update_integration_models",
|
|
3534
|
-
"Enable
|
|
3534
|
+
"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.",
|
|
3535
3535
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationModels,
|
|
3536
3536
|
async (params) => {
|
|
3537
3537
|
const result = await service.integrations.updateIntegrationModels(
|
|
@@ -3560,7 +3560,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3560
3560
|
);
|
|
3561
3561
|
server.tool(
|
|
3562
3562
|
"delete_integration_model",
|
|
3563
|
-
"Delete a
|
|
3563
|
+
"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.",
|
|
3564
3564
|
INTEGRATIONS_TOOL_SCHEMAS.deleteIntegrationModel,
|
|
3565
3565
|
async (params) => {
|
|
3566
3566
|
const result = await service.integrations.deleteIntegrationModel(
|
|
@@ -3586,7 +3586,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3586
3586
|
);
|
|
3587
3587
|
server.tool(
|
|
3588
3588
|
"list_integration_workspaces",
|
|
3589
|
-
"List
|
|
3589
|
+
"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.",
|
|
3590
3590
|
INTEGRATIONS_TOOL_SCHEMAS.listIntegrationWorkspaces,
|
|
3591
3591
|
async (params) => {
|
|
3592
3592
|
const workspaces = await service.integrations.listIntegrationWorkspaces(
|
|
@@ -3625,7 +3625,7 @@ function registerIntegrationsTools(server, service) {
|
|
|
3625
3625
|
);
|
|
3626
3626
|
server.tool(
|
|
3627
3627
|
"update_integration_workspaces",
|
|
3628
|
-
"Control which workspaces can use an integration and set per-workspace
|
|
3628
|
+
"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.",
|
|
3629
3629
|
INTEGRATIONS_TOOL_SCHEMAS.updateIntegrationWorkspaces,
|
|
3630
3630
|
async (params) => {
|
|
3631
3631
|
const result = await service.integrations.updateIntegrationWorkspaces(
|
|
@@ -3753,7 +3753,7 @@ var KEYS_TOOL_SCHEMAS = {
|
|
|
3753
3753
|
function registerKeysTools(server, service) {
|
|
3754
3754
|
server.tool(
|
|
3755
3755
|
"list_virtual_keys",
|
|
3756
|
-
"List
|
|
3756
|
+
"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.",
|
|
3757
3757
|
KEYS_TOOL_SCHEMAS.listVirtualKeys,
|
|
3758
3758
|
async () => {
|
|
3759
3759
|
const virtualKeys = await service.keys.listVirtualKeys();
|
|
@@ -3794,7 +3794,7 @@ function registerKeysTools(server, service) {
|
|
|
3794
3794
|
);
|
|
3795
3795
|
server.tool(
|
|
3796
3796
|
"create_virtual_key",
|
|
3797
|
-
"
|
|
3797
|
+
"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.",
|
|
3798
3798
|
KEYS_TOOL_SCHEMAS.createVirtualKey,
|
|
3799
3799
|
async (params) => {
|
|
3800
3800
|
const result = await service.keys.createVirtualKey({
|
|
@@ -3833,7 +3833,7 @@ function registerKeysTools(server, service) {
|
|
|
3833
3833
|
);
|
|
3834
3834
|
server.tool(
|
|
3835
3835
|
"get_virtual_key",
|
|
3836
|
-
"
|
|
3836
|
+
"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.",
|
|
3837
3837
|
KEYS_TOOL_SCHEMAS.getVirtualKey,
|
|
3838
3838
|
async (params) => {
|
|
3839
3839
|
const virtualKey = await service.keys.getVirtualKey(params.slug);
|
|
@@ -3871,7 +3871,7 @@ function registerKeysTools(server, service) {
|
|
|
3871
3871
|
);
|
|
3872
3872
|
server.tool(
|
|
3873
3873
|
"update_virtual_key",
|
|
3874
|
-
"Update
|
|
3874
|
+
"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.",
|
|
3875
3875
|
KEYS_TOOL_SCHEMAS.updateVirtualKey,
|
|
3876
3876
|
async (params) => {
|
|
3877
3877
|
const result = await service.keys.updateVirtualKey(params.slug, {
|
|
@@ -3905,7 +3905,7 @@ function registerKeysTools(server, service) {
|
|
|
3905
3905
|
);
|
|
3906
3906
|
server.tool(
|
|
3907
3907
|
"delete_virtual_key",
|
|
3908
|
-
"Delete a virtual key by slug. This
|
|
3908
|
+
"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.",
|
|
3909
3909
|
KEYS_TOOL_SCHEMAS.deleteVirtualKey,
|
|
3910
3910
|
async (params) => {
|
|
3911
3911
|
const result = await service.keys.deleteVirtualKey(params.slug);
|
|
@@ -3928,7 +3928,7 @@ function registerKeysTools(server, service) {
|
|
|
3928
3928
|
);
|
|
3929
3929
|
server.tool(
|
|
3930
3930
|
"create_api_key",
|
|
3931
|
-
"Create a
|
|
3931
|
+
"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.",
|
|
3932
3932
|
KEYS_TOOL_SCHEMAS.createApiKey,
|
|
3933
3933
|
async (params) => {
|
|
3934
3934
|
if (params.type === "workspace" && !params.workspace_id) {
|
|
@@ -3999,7 +3999,7 @@ function registerKeysTools(server, service) {
|
|
|
3999
3999
|
);
|
|
4000
4000
|
server.tool(
|
|
4001
4001
|
"list_api_keys",
|
|
4002
|
-
"List Portkey API keys
|
|
4002
|
+
"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.",
|
|
4003
4003
|
KEYS_TOOL_SCHEMAS.listApiKeys,
|
|
4004
4004
|
async (params) => {
|
|
4005
4005
|
const apiKeys = await service.keys.listApiKeys({
|
|
@@ -4052,7 +4052,7 @@ function registerKeysTools(server, service) {
|
|
|
4052
4052
|
);
|
|
4053
4053
|
server.tool(
|
|
4054
4054
|
"get_api_key",
|
|
4055
|
-
"
|
|
4055
|
+
"Fetch one API key by UUID without revealing the secret. Use this to inspect scopes, defaults, limits, expiration, and reset state before changing access.",
|
|
4056
4056
|
KEYS_TOOL_SCHEMAS.getApiKey,
|
|
4057
4057
|
async (params) => {
|
|
4058
4058
|
const apiKey = await service.keys.getApiKey(params.id);
|
|
@@ -4099,7 +4099,7 @@ function registerKeysTools(server, service) {
|
|
|
4099
4099
|
);
|
|
4100
4100
|
server.tool(
|
|
4101
4101
|
"update_api_key",
|
|
4102
|
-
"Update an
|
|
4102
|
+
"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.",
|
|
4103
4103
|
KEYS_TOOL_SCHEMAS.updateApiKey,
|
|
4104
4104
|
async (params) => {
|
|
4105
4105
|
const result = await service.keys.updateApiKey(params.id, {
|
|
@@ -4137,7 +4137,7 @@ function registerKeysTools(server, service) {
|
|
|
4137
4137
|
);
|
|
4138
4138
|
server.tool(
|
|
4139
4139
|
"delete_api_key",
|
|
4140
|
-
"Delete an API key by UUID. This
|
|
4140
|
+
"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.",
|
|
4141
4141
|
KEYS_TOOL_SCHEMAS.deleteApiKey,
|
|
4142
4142
|
async (params) => {
|
|
4143
4143
|
const result = await service.keys.deleteApiKey(params.id);
|
|
@@ -4197,7 +4197,7 @@ var LABELS_TOOL_SCHEMAS = {
|
|
|
4197
4197
|
function registerLabelsTools(server, service) {
|
|
4198
4198
|
server.tool(
|
|
4199
4199
|
"create_prompt_label",
|
|
4200
|
-
"Create a
|
|
4200
|
+
"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.",
|
|
4201
4201
|
LABELS_TOOL_SCHEMAS.createPromptLabel,
|
|
4202
4202
|
async (params) => {
|
|
4203
4203
|
if (!params.organisation_id && !params.workspace_id) {
|
|
@@ -4237,7 +4237,7 @@ function registerLabelsTools(server, service) {
|
|
|
4237
4237
|
);
|
|
4238
4238
|
server.tool(
|
|
4239
4239
|
"list_prompt_labels",
|
|
4240
|
-
"List
|
|
4240
|
+
"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.",
|
|
4241
4241
|
LABELS_TOOL_SCHEMAS.listPromptLabels,
|
|
4242
4242
|
async (params) => {
|
|
4243
4243
|
const result = await service.labels.listLabels(params);
|
|
@@ -4269,7 +4269,7 @@ function registerLabelsTools(server, service) {
|
|
|
4269
4269
|
);
|
|
4270
4270
|
server.tool(
|
|
4271
4271
|
"get_prompt_label",
|
|
4272
|
-
"
|
|
4272
|
+
"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.",
|
|
4273
4273
|
LABELS_TOOL_SCHEMAS.getPromptLabel,
|
|
4274
4274
|
async (params) => {
|
|
4275
4275
|
const label = await service.labels.getLabel(params.label_id, {
|
|
@@ -4303,7 +4303,7 @@ function registerLabelsTools(server, service) {
|
|
|
4303
4303
|
);
|
|
4304
4304
|
server.tool(
|
|
4305
4305
|
"update_prompt_label",
|
|
4306
|
-
"Update a prompt label's name, description, or
|
|
4306
|
+
"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.",
|
|
4307
4307
|
LABELS_TOOL_SCHEMAS.updatePromptLabel,
|
|
4308
4308
|
async (params) => {
|
|
4309
4309
|
const { label_id, ...updateData } = params;
|
|
@@ -4327,7 +4327,7 @@ function registerLabelsTools(server, service) {
|
|
|
4327
4327
|
);
|
|
4328
4328
|
server.tool(
|
|
4329
4329
|
"delete_prompt_label",
|
|
4330
|
-
"Delete a prompt label by ID. This
|
|
4330
|
+
"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.",
|
|
4331
4331
|
LABELS_TOOL_SCHEMAS.deletePromptLabel,
|
|
4332
4332
|
async (params) => {
|
|
4333
4333
|
await service.labels.deleteLabel(params.label_id);
|
|
@@ -4479,7 +4479,7 @@ function formatUsageLimitEntity(entity) {
|
|
|
4479
4479
|
function registerLimitsTools(server, service) {
|
|
4480
4480
|
server.tool(
|
|
4481
4481
|
"list_rate_limits",
|
|
4482
|
-
"
|
|
4482
|
+
"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.",
|
|
4483
4483
|
LIMITS_TOOL_SCHEMAS.listRateLimits,
|
|
4484
4484
|
async (params) => {
|
|
4485
4485
|
const result = await service.limits.listRateLimits(params.workspace_id);
|
|
@@ -4502,7 +4502,7 @@ function registerLimitsTools(server, service) {
|
|
|
4502
4502
|
);
|
|
4503
4503
|
server.tool(
|
|
4504
4504
|
"get_rate_limit",
|
|
4505
|
-
"
|
|
4505
|
+
"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.",
|
|
4506
4506
|
LIMITS_TOOL_SCHEMAS.getRateLimit,
|
|
4507
4507
|
async (params) => {
|
|
4508
4508
|
const result = await service.limits.getRateLimit(params.id);
|
|
@@ -4518,7 +4518,7 @@ function registerLimitsTools(server, service) {
|
|
|
4518
4518
|
);
|
|
4519
4519
|
server.tool(
|
|
4520
4520
|
"create_rate_limit",
|
|
4521
|
-
"Create a
|
|
4521
|
+
"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.",
|
|
4522
4522
|
LIMITS_TOOL_SCHEMAS.createRateLimit,
|
|
4523
4523
|
async (params) => {
|
|
4524
4524
|
const result = await service.limits.createRateLimit({
|
|
@@ -4550,7 +4550,7 @@ function registerLimitsTools(server, service) {
|
|
|
4550
4550
|
);
|
|
4551
4551
|
server.tool(
|
|
4552
4552
|
"update_rate_limit",
|
|
4553
|
-
"Update
|
|
4553
|
+
"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.",
|
|
4554
4554
|
LIMITS_TOOL_SCHEMAS.updateRateLimit,
|
|
4555
4555
|
async (params) => {
|
|
4556
4556
|
const result = await service.limits.updateRateLimit(params.id, {
|
|
@@ -4577,7 +4577,7 @@ function registerLimitsTools(server, service) {
|
|
|
4577
4577
|
);
|
|
4578
4578
|
server.tool(
|
|
4579
4579
|
"delete_rate_limit",
|
|
4580
|
-
"Delete a rate limit
|
|
4580
|
+
"Delete a rate limit by id. This is permanent and removes throttling immediately; review dependent configs and virtual keys before deleting.",
|
|
4581
4581
|
LIMITS_TOOL_SCHEMAS.deleteRateLimit,
|
|
4582
4582
|
async (params) => {
|
|
4583
4583
|
await service.limits.deleteRateLimit(params.id);
|
|
@@ -4600,7 +4600,7 @@ function registerLimitsTools(server, service) {
|
|
|
4600
4600
|
);
|
|
4601
4601
|
server.tool(
|
|
4602
4602
|
"list_usage_limits",
|
|
4603
|
-
"
|
|
4603
|
+
"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.",
|
|
4604
4604
|
LIMITS_TOOL_SCHEMAS.listUsageLimits,
|
|
4605
4605
|
async (params) => {
|
|
4606
4606
|
const result = await service.limits.listUsageLimits(params.workspace_id);
|
|
@@ -4623,7 +4623,7 @@ function registerLimitsTools(server, service) {
|
|
|
4623
4623
|
);
|
|
4624
4624
|
server.tool(
|
|
4625
4625
|
"get_usage_limit",
|
|
4626
|
-
"
|
|
4626
|
+
"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.",
|
|
4627
4627
|
LIMITS_TOOL_SCHEMAS.getUsageLimit,
|
|
4628
4628
|
async (params) => {
|
|
4629
4629
|
const result = await service.limits.getUsageLimit(params.id);
|
|
@@ -4639,7 +4639,7 @@ function registerLimitsTools(server, service) {
|
|
|
4639
4639
|
);
|
|
4640
4640
|
server.tool(
|
|
4641
4641
|
"create_usage_limit",
|
|
4642
|
-
"Create a
|
|
4642
|
+
"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.",
|
|
4643
4643
|
LIMITS_TOOL_SCHEMAS.createUsageLimit,
|
|
4644
4644
|
async (params) => {
|
|
4645
4645
|
const result = await service.limits.createUsageLimit({
|
|
@@ -4672,7 +4672,7 @@ function registerLimitsTools(server, service) {
|
|
|
4672
4672
|
);
|
|
4673
4673
|
server.tool(
|
|
4674
4674
|
"update_usage_limit",
|
|
4675
|
-
"Update
|
|
4675
|
+
"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).",
|
|
4676
4676
|
LIMITS_TOOL_SCHEMAS.updateUsageLimit,
|
|
4677
4677
|
async (params) => {
|
|
4678
4678
|
const result = await service.limits.updateUsageLimit(params.id, {
|
|
@@ -4701,7 +4701,7 @@ function registerLimitsTools(server, service) {
|
|
|
4701
4701
|
);
|
|
4702
4702
|
server.tool(
|
|
4703
4703
|
"delete_usage_limit",
|
|
4704
|
-
"Delete a usage limit
|
|
4704
|
+
"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.",
|
|
4705
4705
|
LIMITS_TOOL_SCHEMAS.deleteUsageLimit,
|
|
4706
4706
|
async (params) => {
|
|
4707
4707
|
await service.limits.deleteUsageLimit(params.id);
|
|
@@ -4724,7 +4724,7 @@ function registerLimitsTools(server, service) {
|
|
|
4724
4724
|
);
|
|
4725
4725
|
server.tool(
|
|
4726
4726
|
"list_usage_limit_entities",
|
|
4727
|
-
"List
|
|
4727
|
+
"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.",
|
|
4728
4728
|
LIMITS_TOOL_SCHEMAS.listUsageLimitEntities,
|
|
4729
4729
|
async (params) => {
|
|
4730
4730
|
const result = await service.limits.listUsageLimitEntities(
|
|
@@ -4749,7 +4749,7 @@ function registerLimitsTools(server, service) {
|
|
|
4749
4749
|
);
|
|
4750
4750
|
server.tool(
|
|
4751
4751
|
"reset_usage_limit_entity",
|
|
4752
|
-
"Reset
|
|
4752
|
+
"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.",
|
|
4753
4753
|
LIMITS_TOOL_SCHEMAS.resetUsageLimitEntity,
|
|
4754
4754
|
async (params) => {
|
|
4755
4755
|
await service.limits.resetUsageLimitEntity(
|
|
@@ -4866,7 +4866,7 @@ var LOGGING_TOOL_SCHEMAS = {
|
|
|
4866
4866
|
function registerLoggingTools(server, service) {
|
|
4867
4867
|
server.tool(
|
|
4868
4868
|
"insert_log",
|
|
4869
|
-
"Insert
|
|
4869
|
+
"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.",
|
|
4870
4870
|
LOGGING_TOOL_SCHEMAS.insertLog,
|
|
4871
4871
|
async (params) => {
|
|
4872
4872
|
const entry = {
|
|
@@ -4914,7 +4914,7 @@ function registerLoggingTools(server, service) {
|
|
|
4914
4914
|
);
|
|
4915
4915
|
server.tool(
|
|
4916
4916
|
"create_log_export",
|
|
4917
|
-
"Create a
|
|
4917
|
+
"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.",
|
|
4918
4918
|
LOGGING_TOOL_SCHEMAS.createLogExport,
|
|
4919
4919
|
async (params) => {
|
|
4920
4920
|
const result = await service.logging.createLogExport({
|
|
@@ -4952,7 +4952,7 @@ function registerLoggingTools(server, service) {
|
|
|
4952
4952
|
);
|
|
4953
4953
|
server.tool(
|
|
4954
4954
|
"list_log_exports",
|
|
4955
|
-
"List
|
|
4955
|
+
"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.",
|
|
4956
4956
|
LOGGING_TOOL_SCHEMAS.listLogExports,
|
|
4957
4957
|
async (params) => {
|
|
4958
4958
|
const result = await service.logging.listLogExports({
|
|
@@ -4987,7 +4987,7 @@ function registerLoggingTools(server, service) {
|
|
|
4987
4987
|
);
|
|
4988
4988
|
server.tool(
|
|
4989
4989
|
"get_log_export",
|
|
4990
|
-
"
|
|
4990
|
+
"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.",
|
|
4991
4991
|
LOGGING_TOOL_SCHEMAS.getLogExport,
|
|
4992
4992
|
async (params) => {
|
|
4993
4993
|
const result = await service.logging.getLogExport(params.export_id);
|
|
@@ -5018,7 +5018,7 @@ function registerLoggingTools(server, service) {
|
|
|
5018
5018
|
);
|
|
5019
5019
|
server.tool(
|
|
5020
5020
|
"start_log_export",
|
|
5021
|
-
"
|
|
5021
|
+
"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.",
|
|
5022
5022
|
LOGGING_TOOL_SCHEMAS.startLogExport,
|
|
5023
5023
|
async (params) => {
|
|
5024
5024
|
const result = await service.logging.startLogExport(params.export_id);
|
|
@@ -5042,7 +5042,7 @@ function registerLoggingTools(server, service) {
|
|
|
5042
5042
|
);
|
|
5043
5043
|
server.tool(
|
|
5044
5044
|
"cancel_log_export",
|
|
5045
|
-
"Cancel a
|
|
5045
|
+
"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.",
|
|
5046
5046
|
LOGGING_TOOL_SCHEMAS.cancelLogExport,
|
|
5047
5047
|
async (params) => {
|
|
5048
5048
|
const result = await service.logging.cancelLogExport(params.export_id);
|
|
@@ -5066,7 +5066,7 @@ function registerLoggingTools(server, service) {
|
|
|
5066
5066
|
);
|
|
5067
5067
|
server.tool(
|
|
5068
5068
|
"download_log_export",
|
|
5069
|
-
"Get
|
|
5069
|
+
"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.",
|
|
5070
5070
|
LOGGING_TOOL_SCHEMAS.downloadLogExport,
|
|
5071
5071
|
async (params) => {
|
|
5072
5072
|
const result = await service.logging.downloadLogExport(params.export_id);
|
|
@@ -5090,7 +5090,7 @@ function registerLoggingTools(server, service) {
|
|
|
5090
5090
|
);
|
|
5091
5091
|
server.tool(
|
|
5092
5092
|
"update_log_export",
|
|
5093
|
-
"Update an existing log export configuration. Only
|
|
5093
|
+
"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.",
|
|
5094
5094
|
LOGGING_TOOL_SCHEMAS.updateLogExport,
|
|
5095
5095
|
async (params) => {
|
|
5096
5096
|
const updateData = {};
|
|
@@ -5257,7 +5257,7 @@ function formatMcpIntegrationWorkspace(workspace) {
|
|
|
5257
5257
|
function registerMcpIntegrationsTools(server, service) {
|
|
5258
5258
|
server.tool(
|
|
5259
5259
|
"list_mcp_integrations",
|
|
5260
|
-
"List
|
|
5260
|
+
"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.",
|
|
5261
5261
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrations,
|
|
5262
5262
|
async (params) => {
|
|
5263
5263
|
const result = await service.mcpIntegrations.listMcpIntegrations(params);
|
|
@@ -5281,7 +5281,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5281
5281
|
);
|
|
5282
5282
|
server.tool(
|
|
5283
5283
|
"create_mcp_integration",
|
|
5284
|
-
"Create
|
|
5284
|
+
"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.",
|
|
5285
5285
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.createMcpIntegration,
|
|
5286
5286
|
async (params) => {
|
|
5287
5287
|
if (params.auth_type === "headers" && (!params.custom_headers || Object.keys(params.custom_headers).length === 0)) {
|
|
@@ -5320,7 +5320,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5320
5320
|
);
|
|
5321
5321
|
server.tool(
|
|
5322
5322
|
"get_mcp_integration",
|
|
5323
|
-
"Retrieve
|
|
5323
|
+
"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.",
|
|
5324
5324
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.getMcpIntegration,
|
|
5325
5325
|
async (params) => {
|
|
5326
5326
|
const integration = await service.mcpIntegrations.getMcpIntegration(
|
|
@@ -5338,7 +5338,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5338
5338
|
);
|
|
5339
5339
|
server.tool(
|
|
5340
5340
|
"update_mcp_integration",
|
|
5341
|
-
"Update an
|
|
5341
|
+
"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.",
|
|
5342
5342
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegration,
|
|
5343
5343
|
async (params) => {
|
|
5344
5344
|
const { id, custom_headers, ...rest } = params;
|
|
@@ -5365,7 +5365,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5365
5365
|
);
|
|
5366
5366
|
server.tool(
|
|
5367
5367
|
"delete_mcp_integration",
|
|
5368
|
-
"Delete an MCP integration
|
|
5368
|
+
"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.",
|
|
5369
5369
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.deleteMcpIntegration,
|
|
5370
5370
|
async (params) => {
|
|
5371
5371
|
await service.mcpIntegrations.deleteMcpIntegration(params.id);
|
|
@@ -5388,7 +5388,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5388
5388
|
);
|
|
5389
5389
|
server.tool(
|
|
5390
5390
|
"get_mcp_integration_metadata",
|
|
5391
|
-
"Retrieve server-reported metadata for an
|
|
5391
|
+
"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.",
|
|
5392
5392
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.getMcpIntegrationMetadata,
|
|
5393
5393
|
async (params) => {
|
|
5394
5394
|
const metadata = await service.mcpIntegrations.getMcpIntegrationMetadata(
|
|
@@ -5410,7 +5410,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5410
5410
|
);
|
|
5411
5411
|
server.tool(
|
|
5412
5412
|
"list_mcp_integration_capabilities",
|
|
5413
|
-
"List
|
|
5413
|
+
"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.",
|
|
5414
5414
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrationCapabilities,
|
|
5415
5415
|
async (params) => {
|
|
5416
5416
|
const result = await service.mcpIntegrations.listMcpIntegrationCapabilities(params.id);
|
|
@@ -5430,7 +5430,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5430
5430
|
);
|
|
5431
5431
|
server.tool(
|
|
5432
5432
|
"update_mcp_integration_capabilities",
|
|
5433
|
-
"Bulk enable or disable capabilities on an MCP integration
|
|
5433
|
+
"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.",
|
|
5434
5434
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegrationCapabilities,
|
|
5435
5435
|
async (params) => {
|
|
5436
5436
|
await service.mcpIntegrations.updateMcpIntegrationCapabilities(
|
|
@@ -5458,7 +5458,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5458
5458
|
);
|
|
5459
5459
|
server.tool(
|
|
5460
5460
|
"list_mcp_integration_workspaces",
|
|
5461
|
-
"List which workspaces
|
|
5461
|
+
"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.",
|
|
5462
5462
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.listMcpIntegrationWorkspaces,
|
|
5463
5463
|
async (params) => {
|
|
5464
5464
|
const result = await service.mcpIntegrations.listMcpIntegrationWorkspaces(
|
|
@@ -5486,7 +5486,7 @@ function registerMcpIntegrationsTools(server, service) {
|
|
|
5486
5486
|
);
|
|
5487
5487
|
server.tool(
|
|
5488
5488
|
"update_mcp_integration_workspaces",
|
|
5489
|
-
"Grant or revoke workspace access to an MCP integration in bulk. Changes
|
|
5489
|
+
"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.",
|
|
5490
5490
|
MCP_INTEGRATIONS_TOOL_SCHEMAS.updateMcpIntegrationWorkspaces,
|
|
5491
5491
|
async (params) => {
|
|
5492
5492
|
await service.mcpIntegrations.updateMcpIntegrationWorkspaces(params.id, {
|
|
@@ -5601,7 +5601,7 @@ function formatMcpServerUserAccess(user) {
|
|
|
5601
5601
|
function registerMcpServersTools(server, service) {
|
|
5602
5602
|
server.tool(
|
|
5603
5603
|
"list_mcp_servers",
|
|
5604
|
-
"List
|
|
5604
|
+
"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.",
|
|
5605
5605
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServers,
|
|
5606
5606
|
async (params) => {
|
|
5607
5607
|
const result = await service.mcpServers.listMcpServers(params);
|
|
@@ -5624,7 +5624,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5624
5624
|
);
|
|
5625
5625
|
server.tool(
|
|
5626
5626
|
"create_mcp_server",
|
|
5627
|
-
"
|
|
5627
|
+
"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.",
|
|
5628
5628
|
MCP_SERVERS_TOOL_SCHEMAS.createMcpServer,
|
|
5629
5629
|
async (params) => {
|
|
5630
5630
|
const result = await service.mcpServers.createMcpServer(params);
|
|
@@ -5648,7 +5648,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5648
5648
|
);
|
|
5649
5649
|
server.tool(
|
|
5650
5650
|
"get_mcp_server",
|
|
5651
|
-
"Retrieve
|
|
5651
|
+
"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.",
|
|
5652
5652
|
MCP_SERVERS_TOOL_SCHEMAS.getMcpServer,
|
|
5653
5653
|
async (params) => {
|
|
5654
5654
|
const mcpServer = await service.mcpServers.getMcpServer(params.id);
|
|
@@ -5664,7 +5664,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5664
5664
|
);
|
|
5665
5665
|
server.tool(
|
|
5666
5666
|
"update_mcp_server",
|
|
5667
|
-
"Update an
|
|
5667
|
+
"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.",
|
|
5668
5668
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServer,
|
|
5669
5669
|
async (params) => {
|
|
5670
5670
|
const { id, ...data } = params;
|
|
@@ -5688,7 +5688,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5688
5688
|
);
|
|
5689
5689
|
server.tool(
|
|
5690
5690
|
"delete_mcp_server",
|
|
5691
|
-
"Delete an MCP server instance
|
|
5691
|
+
"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.",
|
|
5692
5692
|
MCP_SERVERS_TOOL_SCHEMAS.deleteMcpServer,
|
|
5693
5693
|
async (params) => {
|
|
5694
5694
|
await service.mcpServers.deleteMcpServer(params.id);
|
|
@@ -5711,7 +5711,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5711
5711
|
);
|
|
5712
5712
|
server.tool(
|
|
5713
5713
|
"test_mcp_server",
|
|
5714
|
-
"
|
|
5714
|
+
"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.",
|
|
5715
5715
|
MCP_SERVERS_TOOL_SCHEMAS.testMcpServer,
|
|
5716
5716
|
async (params) => {
|
|
5717
5717
|
const result = await service.mcpServers.testMcpServer(params.id);
|
|
@@ -5727,7 +5727,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5727
5727
|
);
|
|
5728
5728
|
server.tool(
|
|
5729
5729
|
"list_mcp_server_capabilities",
|
|
5730
|
-
"List
|
|
5730
|
+
"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.",
|
|
5731
5731
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServerCapabilities,
|
|
5732
5732
|
async (params) => {
|
|
5733
5733
|
const result = await service.mcpServers.listMcpServerCapabilities(
|
|
@@ -5749,7 +5749,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5749
5749
|
);
|
|
5750
5750
|
server.tool(
|
|
5751
5751
|
"update_mcp_server_capabilities",
|
|
5752
|
-
"Enable or disable
|
|
5752
|
+
"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.",
|
|
5753
5753
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerCapabilities,
|
|
5754
5754
|
async (params) => {
|
|
5755
5755
|
await service.mcpServers.updateMcpServerCapabilities(params.id, {
|
|
@@ -5774,7 +5774,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5774
5774
|
);
|
|
5775
5775
|
server.tool(
|
|
5776
5776
|
"list_mcp_server_user_access",
|
|
5777
|
-
"List per-user access
|
|
5777
|
+
"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.",
|
|
5778
5778
|
MCP_SERVERS_TOOL_SCHEMAS.listMcpServerUserAccess,
|
|
5779
5779
|
async (params) => {
|
|
5780
5780
|
const result = await service.mcpServers.listMcpServerUserAccess(
|
|
@@ -5800,7 +5800,7 @@ function registerMcpServersTools(server, service) {
|
|
|
5800
5800
|
);
|
|
5801
5801
|
server.tool(
|
|
5802
5802
|
"update_mcp_server_user_access",
|
|
5803
|
-
"Grant or revoke individual user access to an MCP server.
|
|
5803
|
+
"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.",
|
|
5804
5804
|
MCP_SERVERS_TOOL_SCHEMAS.updateMcpServerUserAccess,
|
|
5805
5805
|
async (params) => {
|
|
5806
5806
|
await service.mcpServers.updateMcpServerUserAccess(params.id, {
|
|
@@ -5865,7 +5865,7 @@ var PARTIALS_TOOL_SCHEMAS = {
|
|
|
5865
5865
|
function registerPartialsTools(server, service) {
|
|
5866
5866
|
server.tool(
|
|
5867
5867
|
"create_prompt_partial",
|
|
5868
|
-
"Create a
|
|
5868
|
+
"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.",
|
|
5869
5869
|
PARTIALS_TOOL_SCHEMAS.createPromptPartial,
|
|
5870
5870
|
async (params) => {
|
|
5871
5871
|
const result = await service.partials.createPromptPartial({
|
|
@@ -5895,7 +5895,7 @@ function registerPartialsTools(server, service) {
|
|
|
5895
5895
|
);
|
|
5896
5896
|
server.tool(
|
|
5897
5897
|
"list_prompt_partials",
|
|
5898
|
-
"List
|
|
5898
|
+
"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.",
|
|
5899
5899
|
PARTIALS_TOOL_SCHEMAS.listPromptPartials,
|
|
5900
5900
|
async (params) => {
|
|
5901
5901
|
const partials = await service.partials.listPromptPartials(params);
|
|
@@ -5926,7 +5926,7 @@ function registerPartialsTools(server, service) {
|
|
|
5926
5926
|
);
|
|
5927
5927
|
server.tool(
|
|
5928
5928
|
"get_prompt_partial",
|
|
5929
|
-
"
|
|
5929
|
+
"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.",
|
|
5930
5930
|
PARTIALS_TOOL_SCHEMAS.getPromptPartial,
|
|
5931
5931
|
async (params) => {
|
|
5932
5932
|
const partial = await service.partials.getPromptPartial(
|
|
@@ -5960,7 +5960,7 @@ function registerPartialsTools(server, service) {
|
|
|
5960
5960
|
);
|
|
5961
5961
|
server.tool(
|
|
5962
5962
|
"update_prompt_partial",
|
|
5963
|
-
"
|
|
5963
|
+
"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.",
|
|
5964
5964
|
PARTIALS_TOOL_SCHEMAS.updatePromptPartial,
|
|
5965
5965
|
async (params) => {
|
|
5966
5966
|
const { prompt_partial_id, ...updateData } = params;
|
|
@@ -5987,7 +5987,7 @@ function registerPartialsTools(server, service) {
|
|
|
5987
5987
|
);
|
|
5988
5988
|
server.tool(
|
|
5989
5989
|
"delete_prompt_partial",
|
|
5990
|
-
"Delete a prompt partial by ID. This
|
|
5990
|
+
"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.",
|
|
5991
5991
|
PARTIALS_TOOL_SCHEMAS.deletePromptPartial,
|
|
5992
5992
|
async (params) => {
|
|
5993
5993
|
await service.partials.deletePromptPartial(params.prompt_partial_id);
|
|
@@ -6010,7 +6010,7 @@ function registerPartialsTools(server, service) {
|
|
|
6010
6010
|
);
|
|
6011
6011
|
server.tool(
|
|
6012
6012
|
"list_partial_versions",
|
|
6013
|
-
"List all versions
|
|
6013
|
+
"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.",
|
|
6014
6014
|
PARTIALS_TOOL_SCHEMAS.listPartialVersions,
|
|
6015
6015
|
async (params) => {
|
|
6016
6016
|
const versions = await service.partials.listPartialVersions(
|
|
@@ -6045,7 +6045,7 @@ function registerPartialsTools(server, service) {
|
|
|
6045
6045
|
);
|
|
6046
6046
|
server.tool(
|
|
6047
6047
|
"publish_partial",
|
|
6048
|
-
"Publish a specific version
|
|
6048
|
+
"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.",
|
|
6049
6049
|
PARTIALS_TOOL_SCHEMAS.publishPartial,
|
|
6050
6050
|
async (params) => {
|
|
6051
6051
|
await service.partials.publishPartial(params.prompt_partial_id, {
|
|
@@ -6370,14 +6370,7 @@ function formatPromptListResponse(prompts, params) {
|
|
|
6370
6370
|
function registerPromptsTools(server, service) {
|
|
6371
6371
|
server.tool(
|
|
6372
6372
|
"create_prompt",
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
IMPORTANT: The "string" parameter accepts TWO legacy formats:
|
|
6376
|
-
1. Plain text: "Hello {{name}}, how can I help?"
|
|
6377
|
-
2. Multi-message JSON array (MUST be a JSON-encoded string):
|
|
6378
|
-
'[{"role":"system","content":[{"type":"text","text":"You are a helpful assistant."}]},{"role":"user","content":[{"type":"text","text":"{{user_input}}"}]}]'
|
|
6379
|
-
|
|
6380
|
-
For structured prompts, prefer the "messages" alias and let the server serialize it to the legacy string format.`,
|
|
6373
|
+
"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.",
|
|
6381
6374
|
PROMPTS_TOOL_SCHEMAS.createPrompt,
|
|
6382
6375
|
async (params) => {
|
|
6383
6376
|
if (!params.model && !params.ai_model_id && !params.finetune_id) {
|
|
@@ -6464,7 +6457,7 @@ For structured prompts, prefer the "messages" alias and let the server serialize
|
|
|
6464
6457
|
);
|
|
6465
6458
|
server.tool(
|
|
6466
6459
|
"list_prompts",
|
|
6467
|
-
"List
|
|
6460
|
+
"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.",
|
|
6468
6461
|
PROMPTS_TOOL_SCHEMAS.listPrompts,
|
|
6469
6462
|
async (params) => {
|
|
6470
6463
|
const prompts = await service.prompts.listPrompts(params);
|
|
@@ -6484,12 +6477,7 @@ For structured prompts, prefer the "messages" alias and let the server serialize
|
|
|
6484
6477
|
);
|
|
6485
6478
|
server.tool(
|
|
6486
6479
|
"get_prompt",
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
The template field shows the raw "string" value stored in Portkey:
|
|
6490
|
-
- If it starts with "[", it is a JSON-encoded messages array (multi-message prompt with roles).
|
|
6491
|
-
- Otherwise it is a plain string template.
|
|
6492
|
-
When updating a prompt, pass the same format back in the "string" field of update_prompt.`,
|
|
6480
|
+
"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.",
|
|
6493
6481
|
PROMPTS_TOOL_SCHEMAS.getPrompt,
|
|
6494
6482
|
async (params) => {
|
|
6495
6483
|
const prompt = await service.prompts.getPrompt(params.prompt_id);
|
|
@@ -6551,14 +6539,7 @@ When updating a prompt, pass the same format back in the "string" field of updat
|
|
|
6551
6539
|
);
|
|
6552
6540
|
server.tool(
|
|
6553
6541
|
"update_prompt",
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
IMPORTANT: The legacy "string" parameter accepts the same two formats as create_prompt:
|
|
6557
|
-
1. Plain text: "Hello {{name}}"
|
|
6558
|
-
2. Multi-message JSON array (MUST be a JSON-encoded string):
|
|
6559
|
-
'[{"role":"system","content":[{"type":"text","text":"..."}]},{"role":"user","content":[{"type":"text","text":"{{input}}"}]}]'
|
|
6560
|
-
|
|
6561
|
-
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.`,
|
|
6542
|
+
"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.",
|
|
6562
6543
|
PROMPTS_TOOL_SCHEMAS.updatePrompt,
|
|
6563
6544
|
async (params) => {
|
|
6564
6545
|
const { prompt_id, dry_run, messages, ...updateData } = params;
|
|
@@ -6623,7 +6604,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6623
6604
|
);
|
|
6624
6605
|
server.tool(
|
|
6625
6606
|
"delete_prompt",
|
|
6626
|
-
"Delete a prompt and all its versions by
|
|
6607
|
+
"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.",
|
|
6627
6608
|
PROMPTS_TOOL_SCHEMAS.deletePrompt,
|
|
6628
6609
|
async (params) => {
|
|
6629
6610
|
await service.prompts.deletePrompt(params.prompt_id);
|
|
@@ -6646,7 +6627,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6646
6627
|
);
|
|
6647
6628
|
server.tool(
|
|
6648
6629
|
"publish_prompt",
|
|
6649
|
-
"Publish a specific version of a prompt
|
|
6630
|
+
"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.",
|
|
6650
6631
|
PROMPTS_TOOL_SCHEMAS.publishPrompt,
|
|
6651
6632
|
async (params) => {
|
|
6652
6633
|
await service.prompts.publishPrompt(params.prompt_id, {
|
|
@@ -6673,7 +6654,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6673
6654
|
);
|
|
6674
6655
|
server.tool(
|
|
6675
6656
|
"list_prompt_versions",
|
|
6676
|
-
"List all versions of
|
|
6657
|
+
"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.",
|
|
6677
6658
|
PROMPTS_TOOL_SCHEMAS.listPromptVersions,
|
|
6678
6659
|
async (params) => {
|
|
6679
6660
|
const versions = await service.prompts.listPromptVersions(
|
|
@@ -6711,7 +6692,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6711
6692
|
);
|
|
6712
6693
|
server.tool(
|
|
6713
6694
|
"render_prompt",
|
|
6714
|
-
"Render a prompt
|
|
6695
|
+
"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.",
|
|
6715
6696
|
PROMPTS_TOOL_SCHEMAS.renderPrompt,
|
|
6716
6697
|
async (params) => {
|
|
6717
6698
|
const result = await service.prompts.renderPrompt(params.prompt_id, {
|
|
@@ -6743,7 +6724,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6743
6724
|
);
|
|
6744
6725
|
server.tool(
|
|
6745
6726
|
"run_prompt_completion",
|
|
6746
|
-
"Execute a prompt
|
|
6727
|
+
"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.",
|
|
6747
6728
|
PROMPTS_TOOL_SCHEMAS.runPromptCompletion,
|
|
6748
6729
|
async (params) => {
|
|
6749
6730
|
const result = await service.prompts.runPromptCompletion(
|
|
@@ -6782,7 +6763,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6782
6763
|
);
|
|
6783
6764
|
server.tool(
|
|
6784
6765
|
"migrate_prompt",
|
|
6785
|
-
"Create or update a prompt
|
|
6766
|
+
"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.",
|
|
6786
6767
|
PROMPTS_TOOL_SCHEMAS.migratePrompt,
|
|
6787
6768
|
async (params) => {
|
|
6788
6769
|
const templateString = normalizePromptTemplateString(params);
|
|
@@ -6836,7 +6817,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6836
6817
|
);
|
|
6837
6818
|
server.tool(
|
|
6838
6819
|
"promote_prompt",
|
|
6839
|
-
"
|
|
6820
|
+
"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.",
|
|
6840
6821
|
PROMPTS_TOOL_SCHEMAS.promotePrompt,
|
|
6841
6822
|
async (params) => {
|
|
6842
6823
|
const result = await service.prompts.promotePrompt({
|
|
@@ -6874,7 +6855,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6874
6855
|
);
|
|
6875
6856
|
server.tool(
|
|
6876
6857
|
"validate_completion_metadata",
|
|
6877
|
-
"
|
|
6858
|
+
"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.",
|
|
6878
6859
|
PROMPTS_TOOL_SCHEMAS.validateCompletionMetadata,
|
|
6879
6860
|
async (params) => {
|
|
6880
6861
|
const result = service.prompts.validateBillingMetadata(params);
|
|
@@ -6899,7 +6880,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6899
6880
|
);
|
|
6900
6881
|
server.tool(
|
|
6901
6882
|
"get_prompt_version",
|
|
6902
|
-
"Retrieve a specific version
|
|
6883
|
+
"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.",
|
|
6903
6884
|
PROMPTS_TOOL_SCHEMAS.getPromptVersion,
|
|
6904
6885
|
async (params) => {
|
|
6905
6886
|
const version = await service.prompts.getPromptVersion(
|
|
@@ -6918,7 +6899,7 @@ For structured chat prompts, prefer the "messages" alias and let the server seri
|
|
|
6918
6899
|
);
|
|
6919
6900
|
server.tool(
|
|
6920
6901
|
"update_prompt_version",
|
|
6921
|
-
"Update a specific prompt version.
|
|
6902
|
+
"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.",
|
|
6922
6903
|
PROMPTS_TOOL_SCHEMAS.updatePromptVersion,
|
|
6923
6904
|
async (params) => {
|
|
6924
6905
|
if (params.label_id === void 0) {
|
|
@@ -7026,7 +7007,7 @@ var PROVIDERS_TOOL_SCHEMAS = {
|
|
|
7026
7007
|
function registerProvidersTools(server, service) {
|
|
7027
7008
|
server.tool(
|
|
7028
7009
|
"list_providers",
|
|
7029
|
-
"List workspace-scoped
|
|
7010
|
+
"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.",
|
|
7030
7011
|
PROVIDERS_TOOL_SCHEMAS.listProviders,
|
|
7031
7012
|
async (params) => {
|
|
7032
7013
|
const providers = await service.providers.listProviders({
|
|
@@ -7072,7 +7053,7 @@ function registerProvidersTools(server, service) {
|
|
|
7072
7053
|
);
|
|
7073
7054
|
server.tool(
|
|
7074
7055
|
"create_provider",
|
|
7075
|
-
"Create a workspace
|
|
7056
|
+
"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.",
|
|
7076
7057
|
PROVIDERS_TOOL_SCHEMAS.createProvider,
|
|
7077
7058
|
async (params) => {
|
|
7078
7059
|
const result = await service.providers.createProvider({
|
|
@@ -7113,7 +7094,7 @@ function registerProvidersTools(server, service) {
|
|
|
7113
7094
|
);
|
|
7114
7095
|
server.tool(
|
|
7115
7096
|
"get_provider",
|
|
7116
|
-
"
|
|
7097
|
+
"Fetch one provider by slug, including limits, rate settings, expiration, and reset status. Use this to check consumption or audit configuration before updating.",
|
|
7117
7098
|
PROVIDERS_TOOL_SCHEMAS.getProvider,
|
|
7118
7099
|
async (params) => {
|
|
7119
7100
|
const provider = await service.providers.getProvider(
|
|
@@ -7155,7 +7136,7 @@ function registerProvidersTools(server, service) {
|
|
|
7155
7136
|
);
|
|
7156
7137
|
server.tool(
|
|
7157
7138
|
"update_provider",
|
|
7158
|
-
"Update a provider's
|
|
7139
|
+
"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.",
|
|
7159
7140
|
PROVIDERS_TOOL_SCHEMAS.updateProvider,
|
|
7160
7141
|
async (params) => {
|
|
7161
7142
|
const result = await service.providers.updateProvider(
|
|
@@ -7198,7 +7179,7 @@ function registerProvidersTools(server, service) {
|
|
|
7198
7179
|
);
|
|
7199
7180
|
server.tool(
|
|
7200
7181
|
"delete_provider",
|
|
7201
|
-
"Delete a workspace
|
|
7182
|
+
"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.",
|
|
7202
7183
|
PROVIDERS_TOOL_SCHEMAS.deleteProvider,
|
|
7203
7184
|
async (params) => {
|
|
7204
7185
|
await service.providers.deleteProvider(params.slug, params.workspace_id);
|
|
@@ -7250,7 +7231,7 @@ var TRACING_TOOL_SCHEMAS = {
|
|
|
7250
7231
|
function registerTracingTools(server, service) {
|
|
7251
7232
|
server.tool(
|
|
7252
7233
|
"create_feedback",
|
|
7253
|
-
"Create feedback for a
|
|
7234
|
+
"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.",
|
|
7254
7235
|
TRACING_TOOL_SCHEMAS.createFeedback,
|
|
7255
7236
|
async (params) => {
|
|
7256
7237
|
const result = await service.tracing.createFeedback({
|
|
@@ -7279,7 +7260,7 @@ function registerTracingTools(server, service) {
|
|
|
7279
7260
|
);
|
|
7280
7261
|
server.tool(
|
|
7281
7262
|
"update_feedback",
|
|
7282
|
-
"Update existing feedback by ID.
|
|
7263
|
+
"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.",
|
|
7283
7264
|
TRACING_TOOL_SCHEMAS.updateFeedback,
|
|
7284
7265
|
async (params) => {
|
|
7285
7266
|
const result = await service.tracing.updateFeedback(params.id, {
|
|
@@ -7408,7 +7389,7 @@ function formatUserAnalyticsGroup(group) {
|
|
|
7408
7389
|
function registerUsersTools(server, service) {
|
|
7409
7390
|
server.tool(
|
|
7410
7391
|
"list_all_users",
|
|
7411
|
-
"List
|
|
7392
|
+
"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.",
|
|
7412
7393
|
USERS_TOOL_SCHEMAS.listAllUsers,
|
|
7413
7394
|
async () => {
|
|
7414
7395
|
const users = await service.users.listUsers();
|
|
@@ -7431,7 +7412,7 @@ function registerUsersTools(server, service) {
|
|
|
7431
7412
|
);
|
|
7432
7413
|
server.tool(
|
|
7433
7414
|
"invite_user",
|
|
7434
|
-
"Invite a new user
|
|
7415
|
+
"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.",
|
|
7435
7416
|
USERS_TOOL_SCHEMAS.inviteUser,
|
|
7436
7417
|
async (params) => {
|
|
7437
7418
|
const result = await service.users.inviteUser(params);
|
|
@@ -7455,7 +7436,7 @@ function registerUsersTools(server, service) {
|
|
|
7455
7436
|
);
|
|
7456
7437
|
server.tool(
|
|
7457
7438
|
"get_user_stats",
|
|
7458
|
-
"
|
|
7439
|
+
"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.",
|
|
7459
7440
|
USERS_TOOL_SCHEMAS.getUserStats,
|
|
7460
7441
|
async (params) => {
|
|
7461
7442
|
const stats = await service.users.getUserGroupedData(params);
|
|
@@ -7478,7 +7459,7 @@ function registerUsersTools(server, service) {
|
|
|
7478
7459
|
);
|
|
7479
7460
|
server.tool(
|
|
7480
7461
|
"get_user",
|
|
7481
|
-
"
|
|
7462
|
+
"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.",
|
|
7482
7463
|
USERS_TOOL_SCHEMAS.getUser,
|
|
7483
7464
|
async (params) => {
|
|
7484
7465
|
const user = await service.users.getUser(params.user_id);
|
|
@@ -7494,7 +7475,7 @@ function registerUsersTools(server, service) {
|
|
|
7494
7475
|
);
|
|
7495
7476
|
server.tool(
|
|
7496
7477
|
"update_user",
|
|
7497
|
-
"Update a user's first name, last name, or organization role
|
|
7478
|
+
"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.",
|
|
7498
7479
|
USERS_TOOL_SCHEMAS.updateUser,
|
|
7499
7480
|
async (params) => {
|
|
7500
7481
|
const { user_id, ...updateData } = params;
|
|
@@ -7518,7 +7499,7 @@ function registerUsersTools(server, service) {
|
|
|
7518
7499
|
);
|
|
7519
7500
|
server.tool(
|
|
7520
7501
|
"delete_user",
|
|
7521
|
-
"
|
|
7502
|
+
"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.",
|
|
7522
7503
|
USERS_TOOL_SCHEMAS.deleteUser,
|
|
7523
7504
|
async (params) => {
|
|
7524
7505
|
await service.users.deleteUser(params.user_id);
|
|
@@ -7541,7 +7522,7 @@ function registerUsersTools(server, service) {
|
|
|
7541
7522
|
);
|
|
7542
7523
|
server.tool(
|
|
7543
7524
|
"list_user_invites",
|
|
7544
|
-
"List
|
|
7525
|
+
"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.",
|
|
7545
7526
|
USERS_TOOL_SCHEMAS.listUserInvites,
|
|
7546
7527
|
async () => {
|
|
7547
7528
|
const invites = await service.users.listUserInvites();
|
|
@@ -7564,7 +7545,7 @@ function registerUsersTools(server, service) {
|
|
|
7564
7545
|
);
|
|
7565
7546
|
server.tool(
|
|
7566
7547
|
"get_user_invite",
|
|
7567
|
-
"
|
|
7548
|
+
"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.",
|
|
7568
7549
|
USERS_TOOL_SCHEMAS.getUserInvite,
|
|
7569
7550
|
async (params) => {
|
|
7570
7551
|
const invite = await service.users.getUserInvite(params.invite_id);
|
|
@@ -7580,7 +7561,7 @@ function registerUsersTools(server, service) {
|
|
|
7580
7561
|
);
|
|
7581
7562
|
server.tool(
|
|
7582
7563
|
"delete_user_invite",
|
|
7583
|
-
"
|
|
7564
|
+
"Delete a pending invite and revoke its invite link. This does not affect existing users; use delete_user for full user removal.",
|
|
7584
7565
|
USERS_TOOL_SCHEMAS.deleteUserInvite,
|
|
7585
7566
|
async (params) => {
|
|
7586
7567
|
await service.users.deleteUserInvite(params.invite_id);
|
|
@@ -7603,7 +7584,7 @@ function registerUsersTools(server, service) {
|
|
|
7603
7584
|
);
|
|
7604
7585
|
server.tool(
|
|
7605
7586
|
"resend_user_invite",
|
|
7606
|
-
"Resend the
|
|
7587
|
+
"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.",
|
|
7607
7588
|
USERS_TOOL_SCHEMAS.resendUserInvite,
|
|
7608
7589
|
async (params) => {
|
|
7609
7590
|
await service.users.resendUserInvite(params.invite_id);
|
|
@@ -7733,7 +7714,7 @@ function formatWorkspaceDetail(workspace) {
|
|
|
7733
7714
|
function registerWorkspacesTools(server, service) {
|
|
7734
7715
|
server.tool(
|
|
7735
7716
|
"list_workspaces",
|
|
7736
|
-
"
|
|
7717
|
+
"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.",
|
|
7737
7718
|
WORKSPACES_TOOL_SCHEMAS.listWorkspaces,
|
|
7738
7719
|
async (params) => {
|
|
7739
7720
|
const workspaces = await service.workspaces.listWorkspaces(params);
|
|
@@ -7756,7 +7737,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7756
7737
|
);
|
|
7757
7738
|
server.tool(
|
|
7758
7739
|
"get_workspace",
|
|
7759
|
-
"
|
|
7740
|
+
"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.",
|
|
7760
7741
|
WORKSPACES_TOOL_SCHEMAS.getWorkspace,
|
|
7761
7742
|
async (params) => {
|
|
7762
7743
|
const workspace = await service.workspaces.getWorkspace(
|
|
@@ -7774,7 +7755,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7774
7755
|
);
|
|
7775
7756
|
server.tool(
|
|
7776
7757
|
"create_workspace",
|
|
7777
|
-
"Create a
|
|
7758
|
+
"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.",
|
|
7778
7759
|
WORKSPACES_TOOL_SCHEMAS.createWorkspace,
|
|
7779
7760
|
async (params) => {
|
|
7780
7761
|
const workspace = await service.workspaces.createWorkspace({
|
|
@@ -7805,7 +7786,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7805
7786
|
);
|
|
7806
7787
|
server.tool(
|
|
7807
7788
|
"update_workspace",
|
|
7808
|
-
"Update a workspace's name, slug, description, default
|
|
7789
|
+
"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.",
|
|
7809
7790
|
WORKSPACES_TOOL_SCHEMAS.updateWorkspace,
|
|
7810
7791
|
async (params) => {
|
|
7811
7792
|
const { workspace_id, is_default, metadata, ...rest } = params;
|
|
@@ -7835,7 +7816,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7835
7816
|
);
|
|
7836
7817
|
server.tool(
|
|
7837
7818
|
"delete_workspace",
|
|
7838
|
-
"Delete a workspace
|
|
7819
|
+
"Delete a workspace by id. This is permanent and removes the workspace, its members, configs, API keys, and resources.",
|
|
7839
7820
|
WORKSPACES_TOOL_SCHEMAS.deleteWorkspace,
|
|
7840
7821
|
async (params) => {
|
|
7841
7822
|
await service.workspaces.deleteWorkspace(params.workspace_id);
|
|
@@ -7858,7 +7839,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7858
7839
|
);
|
|
7859
7840
|
server.tool(
|
|
7860
7841
|
"add_workspace_member",
|
|
7861
|
-
"Add an existing
|
|
7842
|
+
"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.",
|
|
7862
7843
|
WORKSPACES_TOOL_SCHEMAS.addWorkspaceMember,
|
|
7863
7844
|
async (params) => {
|
|
7864
7845
|
const member = await service.workspaces.addWorkspaceMember(
|
|
@@ -7887,7 +7868,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7887
7868
|
);
|
|
7888
7869
|
server.tool(
|
|
7889
7870
|
"list_workspace_members",
|
|
7890
|
-
"List
|
|
7871
|
+
"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.",
|
|
7891
7872
|
WORKSPACES_TOOL_SCHEMAS.listWorkspaceMembers,
|
|
7892
7873
|
async (params) => {
|
|
7893
7874
|
const members = await service.workspaces.listWorkspaceMembers(
|
|
@@ -7912,7 +7893,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7912
7893
|
);
|
|
7913
7894
|
server.tool(
|
|
7914
7895
|
"get_workspace_member",
|
|
7915
|
-
"Get
|
|
7896
|
+
"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.",
|
|
7916
7897
|
WORKSPACES_TOOL_SCHEMAS.getWorkspaceMember,
|
|
7917
7898
|
async (params) => {
|
|
7918
7899
|
const member = await service.workspaces.getWorkspaceMember(
|
|
@@ -7931,7 +7912,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7931
7912
|
);
|
|
7932
7913
|
server.tool(
|
|
7933
7914
|
"update_workspace_member",
|
|
7934
|
-
"Update a workspace member's role. Only the role
|
|
7915
|
+
"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.",
|
|
7935
7916
|
WORKSPACES_TOOL_SCHEMAS.updateWorkspaceMember,
|
|
7936
7917
|
async (params) => {
|
|
7937
7918
|
const member = await service.workspaces.updateWorkspaceMember(
|
|
@@ -7960,7 +7941,7 @@ function registerWorkspacesTools(server, service) {
|
|
|
7960
7941
|
);
|
|
7961
7942
|
server.tool(
|
|
7962
7943
|
"remove_workspace_member",
|
|
7963
|
-
"Remove a user from a workspace
|
|
7944
|
+
"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.",
|
|
7964
7945
|
WORKSPACES_TOOL_SCHEMAS.removeWorkspaceMember,
|
|
7965
7946
|
async (params) => {
|
|
7966
7947
|
await service.workspaces.removeWorkspaceMember(
|