@runpod/mcp-server 4.5.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stdio.mjs CHANGED
@@ -5,14 +5,14 @@ import {
5
5
  publicGraphqlBase,
6
6
  sdkBase,
7
7
  serverlessBase
8
- } from "./chunk-4GF3CMSH.mjs";
8
+ } from "./chunk-5IFIMVI6.mjs";
9
9
 
10
10
  // src/stdio.ts
11
11
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
12
12
 
13
13
  // src/server.ts
14
14
  var SERVER_NAME = "Runpod API Server";
15
- var SERVER_VERSION = true ? "4.5.0" : "dev";
15
+ var SERVER_VERSION = true ? "4.7.0" : "dev";
16
16
 
17
17
  // src/specgen/server.ts
18
18
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -348,6 +348,7 @@ var generatedTools = [
348
348
  title: "Create cluster",
349
349
  operationId: "createCluster",
350
350
  description: "Create an instant cluster (multiple pods with high-speed interconnect). BILLABLE from creation for every pod in the cluster: it rents compute.podCount identical pods at once, each with compute.gpuCountPerPod GPUs of compute.gpuTypeId \u2014 state the hourly price for the total GPU count (podCount * gpuCountPerPod, priced from the catalog tools) and create only after the user's explicit go on that quoted shape and total hourly price. Verify GPU stock first via the catalog tools. The compute shape and type are fixed at creation; only the name can be changed later. The container configuration applies to every pod, and templateId is the only private-image path \u2014 a bare registry property is rejected. Delete with delete-cluster when finished.",
351
+ directoryDescription: "Create an Instant Cluster: compute.podCount identical Pods joined by a high-speed interconnect, each with compute.gpuCountPerPod GPUs of compute.gpuTypeId. Billable from creation for every Pod in the cluster, at the GPU type's hourly price times the total GPU count. The compute shape and type are fixed at creation; only the name can change later. The container configuration applies to every Pod, and templateId is the only way to use a private image; a bare registry property is rejected.",
351
352
  method: "POST",
352
353
  path: "/v2/clusters",
353
354
  params: [],
@@ -363,7 +364,8 @@ var generatedTools = [
363
364
  type: "object",
364
365
  properties: {
365
366
  body: {
366
- $ref: "#/$defs/CreateClusterRequest"
367
+ $ref: "#/$defs/CreateClusterRequest",
368
+ type: "object"
367
369
  }
368
370
  },
369
371
  required: ["body"],
@@ -412,7 +414,7 @@ var generatedTools = [
412
414
  description: "Environment variables as key-value pairs",
413
415
  examples: [
414
416
  {
415
- JUPYTER_PASSWORD: "hunter2"
417
+ JUPYTER_PASSWORD: "changeme"
416
418
  }
417
419
  ]
418
420
  },
@@ -600,7 +602,8 @@ var generatedTools = [
600
602
  type: "object",
601
603
  properties: {
602
604
  body: {
603
- $ref: "#/$defs/CreateDelegationRequest"
605
+ $ref: "#/$defs/CreateDelegationRequest",
606
+ type: "object"
604
607
  }
605
608
  },
606
609
  required: ["body"],
@@ -614,7 +617,7 @@ var generatedTools = [
614
617
  type: "string",
615
618
  description: "ECR resource ARN",
616
619
  examples: [
617
- "arn:aws:ecr:us-east-2:418399314813:repository/runpod/deployment"
620
+ "arn:aws:ecr:us-east-2:123456789012:repository/runpod/deployment"
618
621
  ]
619
622
  },
620
623
  name: {
@@ -632,6 +635,7 @@ var generatedTools = [
632
635
  title: "Create endpoint",
633
636
  operationId: "createEndpoint",
634
637
  description: "Create a serverless endpoint. BILLABLE: state the worker's hourly price (from the catalog tools) before creating. Worker hardware is one of two choices: the gpu object (gpu.pools takes serverless pool ids from the catalog, e.g. ADA_24, never display names; gpu.count sets GPUs per worker) or the cpu array of CPU flavor configurations for a CPU endpoint. type and scaling are required and fix the request-routing model. Workers cold-start on the first job: expect minutes, poll with get-job-status wait.",
638
+ directoryDescription: "Create a Serverless endpoint. Billable while its workers run, at the worker's hourly price. Worker hardware is either the gpu object (gpu.pools takes Serverless pool ids such as ADA_24, and gpu.count sets GPUs per worker) or the cpu array of CPU flavor configurations. type and scaling are required and set the request-routing model. Workers cold-start on their first job, which commonly takes minutes.",
635
639
  method: "POST",
636
640
  path: "/v2/serverless",
637
641
  params: [],
@@ -647,7 +651,8 @@ var generatedTools = [
647
651
  type: "object",
648
652
  properties: {
649
653
  body: {
650
- $ref: "#/$defs/CreateEndpointRequest"
654
+ $ref: "#/$defs/CreateEndpointRequest",
655
+ type: "object"
651
656
  }
652
657
  },
653
658
  required: ["body"],
@@ -696,7 +701,7 @@ var generatedTools = [
696
701
  description: "Environment variables as key-value pairs",
697
702
  examples: [
698
703
  {
699
- JUPYTER_PASSWORD: "hunter2"
704
+ JUPYTER_PASSWORD: "changeme"
700
705
  }
701
706
  ]
702
707
  },
@@ -947,7 +952,7 @@ var generatedTools = [
947
952
  type: "object",
948
953
  required: ["volumeId"],
949
954
  additionalProperties: false,
950
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
955
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
951
956
  properties: {
952
957
  volumeId: {
953
958
  type: "string",
@@ -997,8 +1002,7 @@ var generatedTools = [
997
1002
  },
998
1003
  EndpointType: {
999
1004
  type: "string",
1000
- description: "Request-routing semantics for a modern serverless endpoint. `QUEUE` \u2014 submit asynchronous or synchronous jobs through the managed queue. `LOAD_BALANCER` \u2014 send requests directly to worker-defined HTTP paths.",
1001
- "x-enum-varnames": ["EndpointTypeQueue", "EndpointTypeLoadBalancer"],
1005
+ description: "Request-routing semantics for a serverless endpoint. `QUEUE` \u2014 submit asynchronous or synchronous jobs through the managed queue. `LOAD_BALANCER` \u2014 send requests directly to worker-defined HTTP paths.",
1002
1006
  enum: ["QUEUE", "LOAD_BALANCER"]
1003
1007
  },
1004
1008
  EndpointWorkers: {
@@ -1092,7 +1096,8 @@ var generatedTools = [
1092
1096
  type: "object",
1093
1097
  properties: {
1094
1098
  body: {
1095
- $ref: "#/$defs/CreateGlobalVolumeRequest"
1099
+ $ref: "#/$defs/CreateGlobalVolumeRequest",
1100
+ type: "object"
1096
1101
  }
1097
1102
  },
1098
1103
  required: ["body"],
@@ -1106,7 +1111,6 @@ var generatedTools = [
1106
1111
  type: "string",
1107
1112
  minLength: 1,
1108
1113
  maxLength: 191,
1109
- pattern: "[^\\p{Z}\\t-\\r\x85]",
1110
1114
  description: "Human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
1111
1115
  examples: ["training-data"]
1112
1116
  }
@@ -1134,7 +1138,8 @@ var generatedTools = [
1134
1138
  type: "object",
1135
1139
  properties: {
1136
1140
  body: {
1137
- $ref: "#/$defs/CreateNetworkVolumeRequest"
1141
+ $ref: "#/$defs/CreateNetworkVolumeRequest",
1142
+ type: "object"
1138
1143
  }
1139
1144
  },
1140
1145
  required: ["body"],
@@ -1186,6 +1191,7 @@ var generatedTools = [
1186
1191
  title: "Create Pod",
1187
1192
  operationId: "createPod",
1188
1193
  description: 'Rent a GPU/CPU pod. BILLABLE from creation until stop/terminate: state the hourly price before creating. GPU selection is the gpu object: gpu.id takes a catalog GPU type id (e.g. "NVIDIA GeForce RTX 4090"), verified via list-gpu-types, and gpu.count sets the GPU count; cloud/data-center choice constrains stock.',
1194
+ directoryDescription: 'Create a GPU or CPU Pod. Billable from creation until it is stopped or terminated. GPU selection is the gpu object: gpu.id takes a GPU type id such as "NVIDIA GeForce RTX 4090", and gpu.count sets the number of GPUs. Cloud tier and data center choices limit which machines can host it.',
1189
1195
  method: "POST",
1190
1196
  path: "/v2/pods",
1191
1197
  params: [],
@@ -1201,7 +1207,8 @@ var generatedTools = [
1201
1207
  type: "object",
1202
1208
  properties: {
1203
1209
  body: {
1204
- $ref: "#/$defs/CreatePodRequest"
1210
+ $ref: "#/$defs/CreatePodRequest",
1211
+ type: "object"
1205
1212
  }
1206
1213
  },
1207
1214
  required: ["body"],
@@ -1250,7 +1257,7 @@ var generatedTools = [
1250
1257
  description: "Environment variables as key-value pairs",
1251
1258
  examples: [
1252
1259
  {
1253
- JUPYTER_PASSWORD: "hunter2"
1260
+ JUPYTER_PASSWORD: "changeme"
1254
1261
  }
1255
1262
  ]
1256
1263
  },
@@ -1399,7 +1406,7 @@ var generatedTools = [
1399
1406
  {
1400
1407
  type: "object",
1401
1408
  required: ["name"],
1402
- description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set \u2014 enforced at the handler layer.",
1409
+ description: "Request body for creating a pod. Exactly one of `gpu` or `cpu` must be set. For CPU pods, memory is derived by the API from the selected flavor's RAM multiplier; clients provide only CPU flavor and vCPU count.",
1403
1410
  properties: {
1404
1411
  name: {
1405
1412
  type: "string",
@@ -1429,7 +1436,7 @@ var generatedTools = [
1429
1436
  globalNetworking: {
1430
1437
  type: "boolean",
1431
1438
  default: false,
1432
- description: "Enable global networking, giving the pod a private IP reachable across data centers. Requires an NVIDIA GPU and a global-networking-enabled data center (both enforced upstream).",
1439
+ description: "Enable global networking, giving the pod a private IP reachable across data centers. Requires an NVIDIA GPU and a global-networking-enabled data center. See `list-data-centers` (`globalNetwork`) for eligible data centers.",
1433
1440
  examples: [false]
1434
1441
  },
1435
1442
  gpu: {
@@ -1568,7 +1575,8 @@ var generatedTools = [
1568
1575
  type: "object",
1569
1576
  properties: {
1570
1577
  body: {
1571
- $ref: "#/$defs/CreateRegistryRequest"
1578
+ $ref: "#/$defs/CreateRegistryRequest",
1579
+ type: "object"
1572
1580
  }
1573
1581
  },
1574
1582
  required: ["body"],
@@ -1613,7 +1621,7 @@ var generatedTools = [
1613
1621
  annotations: {
1614
1622
  readOnlyHint: false,
1615
1623
  destructiveHint: false,
1616
- idempotentHint: false,
1624
+ idempotentHint: true,
1617
1625
  openWorldHint: true
1618
1626
  },
1619
1627
  schemaOnDemand: true,
@@ -1621,7 +1629,8 @@ var generatedTools = [
1621
1629
  type: "object",
1622
1630
  properties: {
1623
1631
  body: {
1624
- $ref: "#/$defs/CreateSecretRequest"
1632
+ $ref: "#/$defs/CreateSecretRequest",
1633
+ type: "object"
1625
1634
  }
1626
1635
  },
1627
1636
  required: ["body"],
@@ -1676,7 +1685,8 @@ var generatedTools = [
1676
1685
  type: "object",
1677
1686
  properties: {
1678
1687
  body: {
1679
- $ref: "#/$defs/CreateTemplateRequest"
1688
+ $ref: "#/$defs/CreateTemplateRequest",
1689
+ type: "object"
1680
1690
  }
1681
1691
  },
1682
1692
  required: ["body"],
@@ -1725,7 +1735,7 @@ var generatedTools = [
1725
1735
  description: "Environment variables as key-value pairs",
1726
1736
  examples: [
1727
1737
  {
1728
- JUPYTER_PASSWORD: "hunter2"
1738
+ JUPYTER_PASSWORD: "changeme"
1729
1739
  }
1730
1740
  ]
1731
1741
  },
@@ -1863,6 +1873,7 @@ var generatedTools = [
1863
1873
  title: "Delete cluster",
1864
1874
  operationId: "deleteCluster",
1865
1875
  description: "Delete a cluster permanently: it terminates every member pod. Verify the id with get-cluster, and list-cluster-pods for what the delete takes down, before deleting; delete only clusters your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
1876
+ directoryDescription: "Delete an Instant Cluster permanently. Every member Pod is terminated and its container disk is lost.",
1866
1877
  method: "DELETE",
1867
1878
  path: "/v2/clusters/{id}",
1868
1879
  params: [
@@ -1894,6 +1905,7 @@ var generatedTools = [
1894
1905
  title: "Delete endpoint",
1895
1906
  operationId: "deleteEndpoint",
1896
1907
  description: "Delete a serverless endpoint permanently and immediately. Verify the id belongs to the intended endpoint (get-endpoint) before deleting; delete only endpoints your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
1908
+ directoryDescription: "Delete a Serverless endpoint permanently and immediately.",
1897
1909
  method: "DELETE",
1898
1910
  path: "/v2/serverless/{id}",
1899
1911
  params: [
@@ -1987,6 +1999,7 @@ var generatedTools = [
1987
1999
  title: "Delete Pod",
1988
2000
  operationId: "deletePod",
1989
2001
  description: "Terminate a pod permanently \u2014 its container disk is lost. Distinguish from stopping (pod-action stop) which releases the GPU but keeps volume data. Verify the id with get-pod first; terminate only pods your own tool calls created in this conversation, or the one the user asked you to terminate by id \u2014 a name found by listing is not attribution.",
2002
+ directoryDescription: "Terminate a Pod permanently. Its container disk is lost; data on an attached network volume is kept. Stopping a Pod instead releases its compute but keeps its disk.",
1990
2003
  method: "DELETE",
1991
2004
  path: "/v2/pods/{id}",
1992
2005
  params: [
@@ -2048,6 +2061,7 @@ var generatedTools = [
2048
2061
  title: "Delete secret",
2049
2062
  operationId: "deleteSecret",
2050
2063
  description: "Delete a secret permanently. Environment variables referencing its name ({{ RUNPOD_SECRET_<name> }}) stop resolving at the next pod or worker boot; running instances keep the value they started with. Verify the id with get-secret first; delete only secrets your own tool calls created in this conversation, or the one the user asked you to delete by id \u2014 a name found by listing is not attribution.",
2064
+ directoryDescription: "Delete a secret permanently. Environment variables that reference it ({{ RUNPOD_SECRET_<name> }}) stop resolving at the next Pod or worker boot; running instances keep the value they started with.",
2051
2065
  method: "DELETE",
2052
2066
  path: "/v2/account/secrets/{id}",
2053
2067
  params: [
@@ -2079,6 +2093,7 @@ var generatedTools = [
2079
2093
  title: "Delete template",
2080
2094
  operationId: "deleteTemplate",
2081
2095
  description: "Delete a template permanently. Verify with get-template first; a template referenced by a live endpoint should not be deleted.",
2096
+ directoryDescription: "Delete a template permanently. An endpoint that references the template can stop working once it is deleted.",
2082
2097
  method: "DELETE",
2083
2098
  path: "/v2/templates/{id}",
2084
2099
  params: [
@@ -2181,7 +2196,7 @@ var generatedTools = [
2181
2196
  items: {
2182
2197
  $ref: "#/$defs/CatalogInclude"
2183
2198
  },
2184
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2199
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2185
2200
  },
2186
2201
  product: {
2187
2202
  type: "array",
@@ -2201,7 +2216,7 @@ var generatedTools = [
2201
2216
  $defs: {
2202
2217
  CatalogInclude: {
2203
2218
  type: "string",
2204
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2219
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2205
2220
  enum: ["AVAILABILITY"]
2206
2221
  },
2207
2222
  CpuProduct: {
@@ -2427,7 +2442,7 @@ var generatedTools = [
2427
2442
  items: {
2428
2443
  $ref: "#/$defs/CatalogInclude"
2429
2444
  },
2430
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
2445
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2431
2446
  },
2432
2447
  product: {
2433
2448
  type: "array",
@@ -2444,7 +2459,8 @@ var generatedTools = [
2444
2459
  },
2445
2460
  cloud: {
2446
2461
  $ref: "#/$defs/GpuCloudFilter",
2447
- description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE."
2462
+ description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE.",
2463
+ type: "string"
2448
2464
  },
2449
2465
  countryCodes: {
2450
2466
  type: "array",
@@ -2472,7 +2488,7 @@ var generatedTools = [
2472
2488
  $defs: {
2473
2489
  CatalogInclude: {
2474
2490
  type: "string",
2475
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
2491
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2476
2492
  enum: ["AVAILABILITY"]
2477
2493
  },
2478
2494
  GpuCloudFilter: {
@@ -2681,6 +2697,99 @@ var generatedTools = [
2681
2697
  required: ["id"]
2682
2698
  }
2683
2699
  },
2700
+ {
2701
+ name: "list-audit-logs",
2702
+ title: "List audit logs",
2703
+ operationId: "listAuditLogs",
2704
+ description: "List audit logs. Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.",
2705
+ directoryDescription: "List the account's audit trail, newest first. Results are cursor-paginated and record the actor, action, resource, timestamp, and change details. Filters include actor IDs, actions, time range, and text search. The account's retention window and plan determine which entries are available.",
2706
+ method: "GET",
2707
+ path: "/v2/audit-logs",
2708
+ params: [
2709
+ {
2710
+ name: "actorIds",
2711
+ location: "query",
2712
+ explode: false
2713
+ },
2714
+ {
2715
+ name: "actions",
2716
+ location: "query",
2717
+ explode: false
2718
+ },
2719
+ {
2720
+ name: "startTime",
2721
+ location: "query"
2722
+ },
2723
+ {
2724
+ name: "endTime",
2725
+ location: "query"
2726
+ },
2727
+ {
2728
+ name: "search",
2729
+ location: "query"
2730
+ },
2731
+ {
2732
+ name: "cursor",
2733
+ location: "query"
2734
+ },
2735
+ {
2736
+ name: "limit",
2737
+ location: "query"
2738
+ }
2739
+ ],
2740
+ hasBody: false,
2741
+ annotations: {
2742
+ readOnlyHint: true,
2743
+ destructiveHint: false,
2744
+ idempotentHint: true,
2745
+ openWorldHint: true
2746
+ },
2747
+ inputSchema: {
2748
+ type: "object",
2749
+ properties: {
2750
+ actorIds: {
2751
+ type: "array",
2752
+ items: {
2753
+ type: "string"
2754
+ },
2755
+ description: "Only return entries performed by these users. Comma-separated user IDs. Available to organization accounts only; a personal or team account is answered 400."
2756
+ },
2757
+ actions: {
2758
+ type: "array",
2759
+ items: {
2760
+ type: "string"
2761
+ },
2762
+ description: "Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated."
2763
+ },
2764
+ startTime: {
2765
+ type: "string",
2766
+ format: "date-time",
2767
+ description: "Earliest instant to include, inclusive (RFC 3339). The account's audit log retention window still applies: entries that have aged out are not returned even when this reaches further back."
2768
+ },
2769
+ endTime: {
2770
+ type: "string",
2771
+ format: "date-time",
2772
+ description: "Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise."
2773
+ },
2774
+ search: {
2775
+ type: "string",
2776
+ minLength: 1,
2777
+ description: "Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored."
2778
+ },
2779
+ cursor: {
2780
+ type: "string",
2781
+ minLength: 1,
2782
+ description: "Opaque resume cursor \u2014 pass the previous response's `pagination.nextCursor` through verbatim; omit for the first page. A cursor is only valid for the operation and parameters that issued it; a malformed or foreign cursor is rejected."
2783
+ },
2784
+ limit: {
2785
+ type: "integer",
2786
+ minimum: 1,
2787
+ maximum: 200,
2788
+ description: "Page size, 1\u2013200. Defaults to 200 when omitted."
2789
+ }
2790
+ }
2791
+ }
2792
+ },
2684
2793
  {
2685
2794
  name: "list-billing",
2686
2795
  title: "List billing",
@@ -2728,7 +2837,8 @@ var generatedTools = [
2728
2837
  },
2729
2838
  bucketSize: {
2730
2839
  $ref: "#/$defs/BillingBucketSize",
2731
- description: "Length of each billing time bucket. Defaults to day."
2840
+ description: "Length of each billing time bucket. Defaults to day.",
2841
+ type: "string"
2732
2842
  },
2733
2843
  lastN: {
2734
2844
  type: "integer",
@@ -2740,13 +2850,6 @@ var generatedTools = [
2740
2850
  BillingBucketSize: {
2741
2851
  type: "string",
2742
2852
  enum: ["hour", "day", "week", "month", "year"],
2743
- "x-enum-varnames": [
2744
- "BillingBucketSizeHour",
2745
- "BillingBucketSizeDay",
2746
- "BillingBucketSizeWeek",
2747
- "BillingBucketSizeMonth",
2748
- "BillingBucketSizeYear"
2749
- ],
2750
2853
  default: "day",
2751
2854
  description: "Length of each billing time bucket.",
2752
2855
  examples: ["day"]
@@ -2805,7 +2908,8 @@ var generatedTools = [
2805
2908
  },
2806
2909
  bucketSize: {
2807
2910
  $ref: "#/$defs/BillingBucketSize",
2808
- description: "Length of each billing time bucket. Defaults to day."
2911
+ description: "Length of each billing time bucket. Defaults to day.",
2912
+ type: "string"
2809
2913
  },
2810
2914
  lastN: {
2811
2915
  type: "integer",
@@ -2821,13 +2925,6 @@ var generatedTools = [
2821
2925
  BillingBucketSize: {
2822
2926
  type: "string",
2823
2927
  enum: ["hour", "day", "week", "month", "year"],
2824
- "x-enum-varnames": [
2825
- "BillingBucketSizeHour",
2826
- "BillingBucketSizeDay",
2827
- "BillingBucketSizeWeek",
2828
- "BillingBucketSizeMonth",
2829
- "BillingBucketSizeYear"
2830
- ],
2831
2928
  default: "day",
2832
2929
  description: "Length of each billing time bucket.",
2833
2930
  examples: ["day"]
@@ -2946,7 +3043,7 @@ var generatedTools = [
2946
3043
  items: {
2947
3044
  $ref: "#/$defs/CatalogInclude"
2948
3045
  },
2949
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3046
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
2950
3047
  },
2951
3048
  product: {
2952
3049
  type: "array",
@@ -2965,7 +3062,7 @@ var generatedTools = [
2965
3062
  $defs: {
2966
3063
  CatalogInclude: {
2967
3064
  type: "string",
2968
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3065
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
2969
3066
  enum: ["AVAILABILITY"]
2970
3067
  },
2971
3068
  CpuProduct: {
@@ -3171,7 +3268,8 @@ var generatedTools = [
3171
3268
  },
3172
3269
  bucketSize: {
3173
3270
  $ref: "#/$defs/BillingBucketSize",
3174
- description: "Length of each billing time bucket. Defaults to day."
3271
+ description: "Length of each billing time bucket. Defaults to day.",
3272
+ type: "string"
3175
3273
  },
3176
3274
  lastN: {
3177
3275
  type: "integer",
@@ -3183,13 +3281,6 @@ var generatedTools = [
3183
3281
  BillingBucketSize: {
3184
3282
  type: "string",
3185
3283
  enum: ["hour", "day", "week", "month", "year"],
3186
- "x-enum-varnames": [
3187
- "BillingBucketSizeHour",
3188
- "BillingBucketSizeDay",
3189
- "BillingBucketSizeWeek",
3190
- "BillingBucketSizeMonth",
3191
- "BillingBucketSizeYear"
3192
- ],
3193
3284
  default: "day",
3194
3285
  description: "Length of each billing time bucket.",
3195
3286
  examples: ["day"]
@@ -3426,7 +3517,7 @@ var generatedTools = [
3426
3517
  items: {
3427
3518
  $ref: "#/$defs/CatalogInclude"
3428
3519
  },
3429
- description: "Comma-separated optional expansions. Supported value today: AVAILABILITY. This may expand with more include values in the future."
3520
+ description: "Comma-separated optional expansions; see `CatalogInclude` for the supported values."
3430
3521
  },
3431
3522
  product: {
3432
3523
  type: "array",
@@ -3443,7 +3534,8 @@ var generatedTools = [
3443
3534
  },
3444
3535
  cloud: {
3445
3536
  $ref: "#/$defs/GpuCloudFilter",
3446
- description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE."
3537
+ description: "Cloud type for availability and lowest-price calculations. Valid only with include=AVAILABILITY. Supported values: SECURE, COMMUNITY. Upstream default when omitted: SECURE.",
3538
+ type: "string"
3447
3539
  },
3448
3540
  countryCodes: {
3449
3541
  type: "array",
@@ -3470,7 +3562,7 @@ var generatedTools = [
3470
3562
  $defs: {
3471
3563
  CatalogInclude: {
3472
3564
  type: "string",
3473
- description: "Catalog include expansion. Only AVAILABILITY is supported today; additional include values may be added in the future.",
3565
+ description: "Catalog include expansion. `AVAILABILITY` is the only supported value.",
3474
3566
  enum: ["AVAILABILITY"]
3475
3567
  },
3476
3568
  GpuCloudFilter: {
@@ -3537,7 +3629,8 @@ var generatedTools = [
3537
3629
  },
3538
3630
  bucketSize: {
3539
3631
  $ref: "#/$defs/BillingBucketSize",
3540
- description: "Length of each billing time bucket. Defaults to day."
3632
+ description: "Length of each billing time bucket. Defaults to day.",
3633
+ type: "string"
3541
3634
  },
3542
3635
  lastN: {
3543
3636
  type: "integer",
@@ -3553,13 +3646,6 @@ var generatedTools = [
3553
3646
  BillingBucketSize: {
3554
3647
  type: "string",
3555
3648
  enum: ["hour", "day", "week", "month", "year"],
3556
- "x-enum-varnames": [
3557
- "BillingBucketSizeHour",
3558
- "BillingBucketSizeDay",
3559
- "BillingBucketSizeWeek",
3560
- "BillingBucketSizeMonth",
3561
- "BillingBucketSizeYear"
3562
- ],
3563
3649
  default: "day",
3564
3650
  description: "Length of each billing time bucket.",
3565
3651
  examples: ["day"]
@@ -3659,7 +3745,8 @@ var generatedTools = [
3659
3745
  },
3660
3746
  bucketSize: {
3661
3747
  $ref: "#/$defs/BillingBucketSize",
3662
- description: "Length of each billing time bucket. Defaults to day."
3748
+ description: "Length of each billing time bucket. Defaults to day.",
3749
+ type: "string"
3663
3750
  },
3664
3751
  lastN: {
3665
3752
  type: "integer",
@@ -3675,13 +3762,6 @@ var generatedTools = [
3675
3762
  BillingBucketSize: {
3676
3763
  type: "string",
3677
3764
  enum: ["hour", "day", "week", "month", "year"],
3678
- "x-enum-varnames": [
3679
- "BillingBucketSizeHour",
3680
- "BillingBucketSizeDay",
3681
- "BillingBucketSizeWeek",
3682
- "BillingBucketSizeMonth",
3683
- "BillingBucketSizeYear"
3684
- ],
3685
3765
  default: "day",
3686
3766
  description: "Length of each billing time bucket.",
3687
3767
  examples: ["day"]
@@ -3826,6 +3906,7 @@ var generatedTools = [
3826
3906
  title: "List Serverless billing",
3827
3907
  operationId: "listServerlessBilling",
3828
3908
  description: "Get serverless billing history, split into time buckets. SIZE WARNING: with defaults this emits one record per endpoint PER BUCKET \u2014 on an account with many endpoints the response overflows the tool-result limit and becomes unusable. Always pass lastN: 1 (or a bucketSize spanning the whole window) for one record per endpoint, and serverlessId when you need one endpoint. Distinct from pod billing, which covers standalone pods.",
3909
+ directoryDescription: "Get Serverless billing history, split into time buckets. By default the response has one record per endpoint per bucket, which can be very large on accounts with many endpoints; lastN: 1 (or one bucket spanning the whole window) returns one record per endpoint, and serverlessId narrows it to a single endpoint. Pod billing is reported separately.",
3829
3910
  method: "GET",
3830
3911
  path: "/v2/billing/serverless",
3831
3912
  params: [
@@ -3872,7 +3953,8 @@ var generatedTools = [
3872
3953
  },
3873
3954
  bucketSize: {
3874
3955
  $ref: "#/$defs/BillingBucketSize",
3875
- description: "Length of each billing time bucket. Defaults to day."
3956
+ description: "Length of each billing time bucket. Defaults to day.",
3957
+ type: "string"
3876
3958
  },
3877
3959
  lastN: {
3878
3960
  type: "integer",
@@ -3888,13 +3970,6 @@ var generatedTools = [
3888
3970
  BillingBucketSize: {
3889
3971
  type: "string",
3890
3972
  enum: ["hour", "day", "week", "month", "year"],
3891
- "x-enum-varnames": [
3892
- "BillingBucketSizeHour",
3893
- "BillingBucketSizeDay",
3894
- "BillingBucketSizeWeek",
3895
- "BillingBucketSizeMonth",
3896
- "BillingBucketSizeYear"
3897
- ],
3898
3973
  default: "day",
3899
3974
  description: "Length of each billing time bucket.",
3900
3975
  examples: ["day"]
@@ -3929,7 +4004,8 @@ var generatedTools = [
3929
4004
  type: "string"
3930
4005
  },
3931
4006
  body: {
3932
- $ref: "#/$defs/PodActionRequest"
4007
+ $ref: "#/$defs/PodActionRequest",
4008
+ type: "object"
3933
4009
  }
3934
4010
  },
3935
4011
  required: ["id", "body"],
@@ -3999,7 +4075,7 @@ var generatedTools = [
3999
4075
  annotations: {
4000
4076
  readOnlyHint: false,
4001
4077
  destructiveHint: false,
4002
- idempotentHint: false,
4078
+ idempotentHint: true,
4003
4079
  openWorldHint: true
4004
4080
  },
4005
4081
  inputSchema: {
@@ -4010,7 +4086,8 @@ var generatedTools = [
4010
4086
  description: "Cluster identifier"
4011
4087
  },
4012
4088
  body: {
4013
- $ref: "#/$defs/UpdateClusterRequest"
4089
+ $ref: "#/$defs/UpdateClusterRequest",
4090
+ type: "object"
4014
4091
  }
4015
4092
  },
4016
4093
  required: ["id", "body"],
@@ -4036,6 +4113,7 @@ var generatedTools = [
4036
4113
  title: "Update endpoint",
4037
4114
  operationId: "updateEndpoint",
4038
4115
  description: "Partially update a serverless endpoint (PATCH): only fields present in the body change, omitted ones are untouched, with one exception. DESTRUCTIVE GOTCHA: gpu.pools and gpu.excludedTypes are a single selection, so sending pools without excludedTypes clears any exclusions pinned elsewhere (the console or set-endpoint-gpus) \u2014 read the endpoint first with get-endpoint and resend excludedTypes if you still want them. An exclusion naming a type outside pools returns 400. A CUDA-only or count-only change does not need pools at all, so omit it unless you mean to replace the selection. Mutable fields: name, gpu, cpu, workers (min/max/idleTimeout), scaling (type plus queueDelay or requestCount), dataCenterIds, networkVolumes, timeout, flashboot, and the container settings (image, args, disk, ports, env, registry). cpu completely replaces a CPU endpoint's flavor selection. Compute family is immutable: gpu on a CPU endpoint, cpu on a GPU one, or both, returns 400. Effect timing differs by field \u2014 workers/scaling/timeout reach the autoscaler promptly, while container changes (image, env) cut a new release that rolls out as workers cycle, so in-flight workers keep the previous version. Track rollout with list-endpoint-releases.",
4116
+ directoryDescription: "Partially update a Serverless endpoint (PATCH): only fields present in the body change. gpu.pools and gpu.excludedTypes are one selection, so sending pools without excludedTypes clears existing exclusions; an exclusion naming a type outside pools returns 400, and a CUDA-only or count-only change does not need pools. Mutable fields: name, gpu, cpu, workers (min/max/idleTimeout), scaling (type plus queueDelay or requestCount), dataCenterIds, networkVolumes, timeout, flashboot, and the container settings (image, args, disk, ports, env, registry). cpu replaces a CPU endpoint's whole flavor selection. The compute family is fixed: gpu on a CPU endpoint, cpu on a GPU one, or both returns 400. Worker, scaling and timeout changes apply promptly; container changes (image, env) create a new release that rolls out as workers cycle, so in-flight workers keep the previous version.",
4039
4117
  method: "PATCH",
4040
4118
  path: "/v2/serverless/{id}",
4041
4119
  params: [
@@ -4047,7 +4125,7 @@ var generatedTools = [
4047
4125
  hasBody: true,
4048
4126
  annotations: {
4049
4127
  readOnlyHint: false,
4050
- destructiveHint: false,
4128
+ destructiveHint: true,
4051
4129
  idempotentHint: false,
4052
4130
  openWorldHint: true
4053
4131
  },
@@ -4060,7 +4138,8 @@ var generatedTools = [
4060
4138
  description: "Serverless endpoint identifier"
4061
4139
  },
4062
4140
  body: {
4063
- $ref: "#/$defs/UpdateEndpointRequest"
4141
+ $ref: "#/$defs/UpdateEndpointRequest",
4142
+ type: "object"
4064
4143
  }
4065
4144
  },
4066
4145
  required: ["id", "body"],
@@ -4109,7 +4188,7 @@ var generatedTools = [
4109
4188
  description: "Environment variables as key-value pairs",
4110
4189
  examples: [
4111
4190
  {
4112
- JUPYTER_PASSWORD: "hunter2"
4191
+ JUPYTER_PASSWORD: "changeme"
4113
4192
  }
4114
4193
  ]
4115
4194
  },
@@ -4206,7 +4285,7 @@ var generatedTools = [
4206
4285
  type: "object",
4207
4286
  required: ["volumeId"],
4208
4287
  additionalProperties: false,
4209
- description: "A volume mounted on every worker, always at `/runpod-volume`. Custom paths are not supported yet.",
4288
+ description: "A volume mounted on every worker, always at `/runpod-volume`.",
4210
4289
  properties: {
4211
4290
  volumeId: {
4212
4291
  type: "string",
@@ -4439,7 +4518,7 @@ var generatedTools = [
4439
4518
  annotations: {
4440
4519
  readOnlyHint: false,
4441
4520
  destructiveHint: false,
4442
- idempotentHint: false,
4521
+ idempotentHint: true,
4443
4522
  openWorldHint: true
4444
4523
  },
4445
4524
  inputSchema: {
@@ -4450,7 +4529,8 @@ var generatedTools = [
4450
4529
  description: "Global volume identifier"
4451
4530
  },
4452
4531
  body: {
4453
- $ref: "#/$defs/UpdateGlobalVolumeRequest"
4532
+ $ref: "#/$defs/UpdateGlobalVolumeRequest",
4533
+ type: "object"
4454
4534
  }
4455
4535
  },
4456
4536
  required: ["id", "body"],
@@ -4465,7 +4545,6 @@ var generatedTools = [
4465
4545
  type: "string",
4466
4546
  minLength: 1,
4467
4547
  maxLength: 191,
4468
- pattern: "[^\\p{Z}\\t-\\r\x85]",
4469
4548
  description: "New human-readable name, 1\u2013191 characters with at least one non-whitespace character. Leading and trailing whitespace is trimmed.",
4470
4549
  examples: ["renamed-volume"]
4471
4550
  }
@@ -4491,7 +4570,7 @@ var generatedTools = [
4491
4570
  annotations: {
4492
4571
  readOnlyHint: false,
4493
4572
  destructiveHint: false,
4494
- idempotentHint: false,
4573
+ idempotentHint: true,
4495
4574
  openWorldHint: true
4496
4575
  },
4497
4576
  inputSchema: {
@@ -4502,7 +4581,8 @@ var generatedTools = [
4502
4581
  description: "Network volume identifier"
4503
4582
  },
4504
4583
  body: {
4505
- $ref: "#/$defs/UpdateNetworkVolumeRequest"
4584
+ $ref: "#/$defs/UpdateNetworkVolumeRequest",
4585
+ type: "object"
4506
4586
  }
4507
4587
  },
4508
4588
  required: ["id", "body"],
@@ -4547,7 +4627,7 @@ var generatedTools = [
4547
4627
  hasBody: true,
4548
4628
  annotations: {
4549
4629
  readOnlyHint: false,
4550
- destructiveHint: false,
4630
+ destructiveHint: true,
4551
4631
  idempotentHint: false,
4552
4632
  openWorldHint: true
4553
4633
  },
@@ -4560,7 +4640,8 @@ var generatedTools = [
4560
4640
  description: "Pod identifier"
4561
4641
  },
4562
4642
  body: {
4563
- $ref: "#/$defs/UpdatePodRequest"
4643
+ $ref: "#/$defs/UpdatePodRequest",
4644
+ type: "object"
4564
4645
  }
4565
4646
  },
4566
4647
  required: ["id", "body"],
@@ -4609,7 +4690,7 @@ var generatedTools = [
4609
4690
  description: "Environment variables as key-value pairs",
4610
4691
  examples: [
4611
4692
  {
4612
- JUPYTER_PASSWORD: "hunter2"
4693
+ JUPYTER_PASSWORD: "changeme"
4613
4694
  }
4614
4695
  ]
4615
4696
  },
@@ -4747,7 +4828,7 @@ var generatedTools = [
4747
4828
  properties: {
4748
4829
  globalNetworking: {
4749
4830
  type: "boolean",
4750
- description: "Enable (true) or disable (false) global networking. Takes effect on the next pod start/restart, not live. Requires an NVIDIA GPU and a global-networking-enabled data center (both enforced upstream)."
4831
+ description: "Enable (true) or disable (false) global networking. Takes effect on the next pod start/restart, not live. Requires an NVIDIA GPU and a global-networking-enabled data center."
4751
4832
  },
4752
4833
  locked: {
4753
4834
  type: "boolean",
@@ -4789,7 +4870,7 @@ var generatedTools = [
4789
4870
  hasBody: true,
4790
4871
  annotations: {
4791
4872
  readOnlyHint: false,
4792
- destructiveHint: false,
4873
+ destructiveHint: true,
4793
4874
  idempotentHint: false,
4794
4875
  openWorldHint: true
4795
4876
  },
@@ -4802,7 +4883,8 @@ var generatedTools = [
4802
4883
  description: "Secret identifier"
4803
4884
  },
4804
4885
  body: {
4805
- $ref: "#/$defs/UpdateSecretRequest"
4886
+ $ref: "#/$defs/UpdateSecretRequest",
4887
+ type: "object"
4806
4888
  }
4807
4889
  },
4808
4890
  required: ["id", "body"],
@@ -4848,7 +4930,8 @@ var generatedTools = [
4848
4930
  type: "object",
4849
4931
  properties: {
4850
4932
  body: {
4851
- $ref: "#/$defs/UpdateSshKeysRequest"
4933
+ $ref: "#/$defs/UpdateSshKeysRequest",
4934
+ type: "object"
4852
4935
  }
4853
4936
  },
4854
4937
  required: ["body"],
@@ -4892,8 +4975,8 @@ var generatedTools = [
4892
4975
  hasBody: true,
4893
4976
  annotations: {
4894
4977
  readOnlyHint: false,
4895
- destructiveHint: false,
4896
- idempotentHint: false,
4978
+ destructiveHint: true,
4979
+ idempotentHint: true,
4897
4980
  openWorldHint: true
4898
4981
  },
4899
4982
  schemaOnDemand: true,
@@ -4904,7 +4987,8 @@ var generatedTools = [
4904
4987
  type: "string"
4905
4988
  },
4906
4989
  body: {
4907
- $ref: "#/$defs/UpdateTemplateRequest"
4990
+ $ref: "#/$defs/UpdateTemplateRequest",
4991
+ type: "object"
4908
4992
  }
4909
4993
  },
4910
4994
  required: ["id", "body"],
@@ -4953,7 +5037,7 @@ var generatedTools = [
4953
5037
  description: "Environment variables as key-value pairs",
4954
5038
  examples: [
4955
5039
  {
4956
- JUPYTER_PASSWORD: "hunter2"
5040
+ JUPYTER_PASSWORD: "changeme"
4957
5041
  }
4958
5042
  ]
4959
5043
  },
@@ -5073,80 +5157,43 @@ var generatedTools = [
5073
5157
  }
5074
5158
  ];
5075
5159
 
5076
- // src/specgen/pagination.ts
5077
- var DEFAULT_LIST_LIMIT = 20;
5078
- var MAX_LIST_LIMIT = 100;
5079
- var listPaginationProperties = {
5080
- limit: {
5081
- type: "integer",
5082
- minimum: 1,
5083
- maximum: MAX_LIST_LIMIT,
5084
- description: `Maximum number of items to return (default ${DEFAULT_LIST_LIMIT}, max ${MAX_LIST_LIMIT}). Use the returned nextCursor to fetch the next page.`
5085
- },
5086
- cursor: {
5087
- type: "string",
5088
- description: "Opaque pagination cursor from a previous response (nextCursor). Omit to start from the beginning."
5089
- }
5160
+ // src/specgen/tools/annotations.ts
5161
+ var readOnly = {
5162
+ readOnlyHint: true,
5163
+ destructiveHint: false,
5164
+ idempotentHint: true,
5165
+ openWorldHint: true
5166
+ };
5167
+ var bundledRead = {
5168
+ readOnlyHint: true,
5169
+ destructiveHint: false,
5170
+ idempotentHint: true,
5171
+ openWorldHint: false
5172
+ };
5173
+ var write = {
5174
+ readOnlyHint: false,
5175
+ destructiveHint: false,
5176
+ idempotentHint: false,
5177
+ openWorldHint: true
5178
+ };
5179
+ var idempotentWrite = {
5180
+ readOnlyHint: false,
5181
+ destructiveHint: false,
5182
+ idempotentHint: true,
5183
+ openWorldHint: true
5184
+ };
5185
+ var destructive = {
5186
+ readOnlyHint: false,
5187
+ destructiveHint: true,
5188
+ idempotentHint: true,
5189
+ openWorldHint: true
5190
+ };
5191
+ var destructiveWrite = {
5192
+ readOnlyHint: false,
5193
+ destructiveHint: true,
5194
+ idempotentHint: false,
5195
+ openWorldHint: true
5090
5196
  };
5091
- function clampListLimit(limit) {
5092
- const requested = Number(limit);
5093
- return Math.min(
5094
- Number.isFinite(requested) && requested >= 1 ? Math.floor(requested) : DEFAULT_LIST_LIMIT,
5095
- MAX_LIST_LIMIT
5096
- );
5097
- }
5098
- function serverPageQuery(args) {
5099
- const cursor = typeof args.cursor === "string" && args.cursor !== "" ? args.cursor : void 0;
5100
- return { limit: clampListLimit(args.limit), ...cursor ? { cursor } : {} };
5101
- }
5102
- function serverPagination(pagination, returned) {
5103
- const hasNextPage = pagination?.hasNextPage === true;
5104
- return {
5105
- returned,
5106
- hasNextPage,
5107
- nextCursor: pagination?.nextCursor ?? null,
5108
- ...hasNextPage ? { note: "More results exist. Pass cursor=nextCursor to fetch them." } : {}
5109
- };
5110
- }
5111
- function decodeCursorOffset(cursor) {
5112
- if (!cursor) return 0;
5113
- try {
5114
- const decoded = Buffer.from(cursor, "base64").toString("utf8");
5115
- if (!/^\d+$/.test(decoded)) return 0;
5116
- const offset = Number.parseInt(decoded, 10);
5117
- return Number.isFinite(offset) && offset >= 0 ? offset : 0;
5118
- } catch {
5119
- return 0;
5120
- }
5121
- }
5122
- function encodeCursorOffset(offset) {
5123
- return Buffer.from(String(offset), "utf8").toString("base64");
5124
- }
5125
- function capList(items, options, extra) {
5126
- const limit = clampListLimit(options.limit);
5127
- const offset = decodeCursorOffset(options.cursor);
5128
- const total = items.length;
5129
- const page = items.slice(offset, offset + limit);
5130
- const nextOffset = offset + page.length;
5131
- const hasMore = nextOffset < total;
5132
- const { items: _i, pagination: _p, ...safeExtra } = extra ?? {};
5133
- void _i;
5134
- void _p;
5135
- return {
5136
- ...safeExtra,
5137
- items: page,
5138
- pagination: {
5139
- total,
5140
- returned: page.length,
5141
- offset,
5142
- truncated: hasMore,
5143
- nextCursor: hasMore ? encodeCursorOffset(nextOffset) : null,
5144
- ...hasMore ? {
5145
- note: `Showing ${page.length} of ${total}. Pass cursor=nextCursor to fetch more, or narrow the query with filters.`
5146
- } : {}
5147
- }
5148
- };
5149
- }
5150
5197
 
5151
5198
  // src/specgen/clients/http-error.ts
5152
5199
  var HttpError = class extends Error {
@@ -5241,37 +5288,270 @@ async function runTool(body) {
5241
5288
  }
5242
5289
  }
5243
5290
 
5244
- // src/specgen/tools/annotations.ts
5245
- var readOnly = {
5246
- readOnlyHint: true,
5247
- destructiveHint: false,
5248
- idempotentHint: true,
5249
- openWorldHint: true
5250
- };
5251
- var bundledRead = {
5252
- readOnlyHint: true,
5253
- destructiveHint: false,
5254
- idempotentHint: true,
5255
- openWorldHint: false
5256
- };
5257
- var write = {
5258
- readOnlyHint: false,
5259
- destructiveHint: false,
5260
- idempotentHint: false,
5261
- openWorldHint: true
5291
+ // src/specgen/tools/pod-transitions.ts
5292
+ var podAction = generatedTools.find((tool) => tool.name === "pod-action");
5293
+ if (!podAction)
5294
+ throw new Error("pod-action is missing from the generated tools");
5295
+ var POD_ID = {
5296
+ type: "object",
5297
+ properties: { id: { type: "string", description: "ID of the Pod" } },
5298
+ required: ["id"],
5299
+ additionalProperties: false
5262
5300
  };
5263
- var idempotentWrite = {
5264
- readOnlyHint: false,
5265
- destructiveHint: false,
5266
- idempotentHint: true,
5267
- openWorldHint: true
5301
+ function transition(action, title, description, annotations) {
5302
+ return {
5303
+ name: `${action}-pod`,
5304
+ title,
5305
+ description,
5306
+ inputSchema: POD_ID,
5307
+ annotations,
5308
+ handler: (ctx, args) => runTool(
5309
+ () => dispatchGeneratedTool(ctx.sdk, podAction, {
5310
+ id: args.id,
5311
+ body: { action }
5312
+ })
5313
+ )
5314
+ };
5315
+ }
5316
+ var podTransitionTools = [
5317
+ transition(
5318
+ "start",
5319
+ "Start Pod",
5320
+ "Start a stopped Pod (status EXITED or ERROR). Billable: the Pod accrues its hourly price while it runs. Returns the updated Pod; a Pod in any other status returns 409.",
5321
+ write
5322
+ ),
5323
+ transition(
5324
+ "stop",
5325
+ "Stop Pod",
5326
+ "Stop a running or provisioning Pod. It releases its GPU or CPU and stops compute billing; the container disk is wiped, while the volume disk and any attached network volume keep their data and volume storage keeps billing. Returns the updated Pod; a Pod in any other status returns 409.",
5327
+ destructiveWrite
5328
+ ),
5329
+ transition(
5330
+ "restart",
5331
+ "Restart Pod",
5332
+ "Restart a running Pod's container in place. Whatever is running in the container is interrupted and the container disk is wiped; the volume disk and any attached network volume keep their data. Returns the updated Pod; a Pod that is not RUNNING returns 409.",
5333
+ destructiveWrite
5334
+ )
5335
+ ];
5336
+
5337
+ // src/specgen/profile.ts
5338
+ var IN = { include: true };
5339
+ var CREDENTIAL_MANAGEMENT = "Manages stored credentials; OpenAI restricts plugins that handle access credentials, so the directory leaves the whole credential family out.";
5340
+ var CREDENTIAL_INPUT = "Takes a secret or password as input; directories forbid collecting credentials.";
5341
+ var ALP = "Collects conversation-derived data beyond the task; the directory profile never serves it.";
5342
+ var DIRECTORY_TOOLS = {
5343
+ "cancel-job": IN,
5344
+ "create-cluster": IN,
5345
+ "create-delegation": IN,
5346
+ "create-endpoint": IN,
5347
+ "create-global-volume": IN,
5348
+ "create-network-volume": IN,
5349
+ "create-pod": IN,
5350
+ "create-template": IN,
5351
+ "delete-cluster": IN,
5352
+ "delete-endpoint": IN,
5353
+ "delete-global-volume": IN,
5354
+ "delete-network-volume": IN,
5355
+ "delete-pod": IN,
5356
+ "delete-template": IN,
5357
+ "deploy-hub-repo": IN,
5358
+ "endpoint-health": IN,
5359
+ "get-capacity": IN,
5360
+ "get-cluster": IN,
5361
+ "get-cpu-type": IN,
5362
+ "get-data-center": IN,
5363
+ "get-endpoint": IN,
5364
+ "get-endpoint-build": IN,
5365
+ "get-global-volume": IN,
5366
+ "get-gpu-type": IN,
5367
+ "get-job-status": IN,
5368
+ "get-network-volume": IN,
5369
+ "get-organization": IN,
5370
+ "get-pod": IN,
5371
+ "get-ssh-keys": IN,
5372
+ "get-template": IN,
5373
+ "list-audit-logs": IN,
5374
+ "list-billing": IN,
5375
+ "list-cluster-billing": IN,
5376
+ "list-cluster-pods": IN,
5377
+ "list-clusters": IN,
5378
+ "list-cpu-types": IN,
5379
+ "list-data-centers": IN,
5380
+ "list-delegations": IN,
5381
+ "list-endpoint-billing": IN,
5382
+ "list-endpoint-builds": IN,
5383
+ "list-endpoint-releases": IN,
5384
+ "list-endpoint-workers": IN,
5385
+ "list-endpoints": IN,
5386
+ "list-global-volumes": IN,
5387
+ "list-gpu-types": IN,
5388
+ "list-hub-repos": IN,
5389
+ "list-network-volume-billing": IN,
5390
+ "list-network-volumes": IN,
5391
+ "list-pod-billing": IN,
5392
+ "list-pods": IN,
5393
+ "list-public-endpoints": IN,
5394
+ "list-public-templates": IN,
5395
+ "list-serverless-billing": IN,
5396
+ "list-templates": IN,
5397
+ "lookup-concept": IN,
5398
+ "purge-endpoint-queue": IN,
5399
+ "retry-job": IN,
5400
+ "revoke-delegation": IN,
5401
+ "search-concepts": IN,
5402
+ "search-docs": IN,
5403
+ "set-endpoint-gpus": IN,
5404
+ "stream-job": IN,
5405
+ "stream-pod-logs": IN,
5406
+ "stream-worker-logs": IN,
5407
+ "update-cluster": IN,
5408
+ "update-endpoint": IN,
5409
+ "update-global-volume": IN,
5410
+ "update-network-volume": IN,
5411
+ "update-pod": IN,
5412
+ "update-ssh-keys": IN,
5413
+ "update-template": IN,
5414
+ "run-endpoint": { include: true, omitInputs: ["s3Config"] },
5415
+ "runsync-endpoint": { include: true, omitInputs: ["s3Config"] },
5416
+ "pod-action": {
5417
+ include: false,
5418
+ reason: "Takes the transition as an argument; OpenAI asks for one tool per operation, so the directory serves start-pod, stop-pod and restart-pod (terminate is delete-pod)."
5419
+ },
5420
+ "start-pod": IN,
5421
+ "stop-pod": IN,
5422
+ "restart-pod": IN,
5423
+ "list-guides": {
5424
+ include: false,
5425
+ reason: "Serves playbooks that instruct the model how to behave."
5426
+ },
5427
+ "read-guide": {
5428
+ include: false,
5429
+ reason: "Serves playbooks that instruct the model how to behave."
5430
+ },
5431
+ "describe-tool": {
5432
+ include: false,
5433
+ reason: "Fetches schemas the directory already lists in full; directories reject schema fetching."
5434
+ },
5435
+ "create-secret": { include: false, reason: CREDENTIAL_INPUT },
5436
+ "get-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5437
+ "list-secrets": { include: false, reason: CREDENTIAL_MANAGEMENT },
5438
+ "delete-secret": { include: false, reason: CREDENTIAL_MANAGEMENT },
5439
+ "get-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5440
+ "list-registries": { include: false, reason: CREDENTIAL_MANAGEMENT },
5441
+ "delete-registry": { include: false, reason: CREDENTIAL_MANAGEMENT },
5442
+ "update-secret": { include: false, reason: CREDENTIAL_INPUT },
5443
+ "create-registry": { include: false, reason: CREDENTIAL_INPUT },
5444
+ report_feedback: { include: false, reason: ALP },
5445
+ report_how_user_found_runpod: { include: false, reason: ALP },
5446
+ save_to_journal: { include: false, reason: ALP },
5447
+ read_journal: { include: false, reason: ALP },
5448
+ ask_question: { include: false, reason: ALP }
5268
5449
  };
5269
- var destructive = {
5270
- readOnlyHint: false,
5271
- destructiveHint: true,
5272
- idempotentHint: true,
5273
- openWorldHint: true
5450
+ function directoryIncludes(name) {
5451
+ return DIRECTORY_TOOLS[name]?.include === true;
5452
+ }
5453
+ function directoryOmittedInputs(name) {
5454
+ const decision = DIRECTORY_TOOLS[name];
5455
+ return decision?.include ? decision.omitInputs ?? [] : [];
5456
+ }
5457
+
5458
+ // src/specgen/redact.ts
5459
+ var REDACTED = "[redacted]";
5460
+ var SECRET_KEY = /pass(word|wd)?|secret|token|api_?key|private_?key|credential|auth/i;
5461
+ var SECRET_REFERENCE = /^\s*\{\{\s*RUNPOD_SECRET_[^}]+\}\}\s*$/;
5462
+ function redactEnv(env) {
5463
+ return Object.fromEntries(
5464
+ Object.entries(env).map(([key, value]) => [
5465
+ key,
5466
+ typeof value === "string" && value !== "" && SECRET_KEY.test(key) && !SECRET_REFERENCE.test(value) ? REDACTED : value
5467
+ ])
5468
+ );
5469
+ }
5470
+ function redactSecretEnv(payload) {
5471
+ if (Array.isArray(payload)) return payload.map(redactSecretEnv);
5472
+ if (!payload || typeof payload !== "object") return payload;
5473
+ return Object.fromEntries(
5474
+ Object.entries(payload).map(([key, value]) => [
5475
+ key,
5476
+ key === "env" && value && typeof value === "object" && !Array.isArray(value) ? redactEnv(value) : redactSecretEnv(value)
5477
+ ])
5478
+ );
5479
+ }
5480
+
5481
+ // src/specgen/pagination.ts
5482
+ var DEFAULT_LIST_LIMIT = 20;
5483
+ var MAX_LIST_LIMIT = 100;
5484
+ var listPaginationProperties = {
5485
+ limit: {
5486
+ type: "integer",
5487
+ minimum: 1,
5488
+ maximum: MAX_LIST_LIMIT,
5489
+ description: `Maximum number of items to return (default ${DEFAULT_LIST_LIMIT}, max ${MAX_LIST_LIMIT}). Use the returned nextCursor to fetch the next page.`
5490
+ },
5491
+ cursor: {
5492
+ type: "string",
5493
+ description: "Opaque pagination cursor from a previous response (nextCursor). Omit to start from the beginning."
5494
+ }
5274
5495
  };
5496
+ function clampListLimit(limit) {
5497
+ const requested = Number(limit);
5498
+ return Math.min(
5499
+ Number.isFinite(requested) && requested >= 1 ? Math.floor(requested) : DEFAULT_LIST_LIMIT,
5500
+ MAX_LIST_LIMIT
5501
+ );
5502
+ }
5503
+ function serverPageQuery(args) {
5504
+ const cursor = typeof args.cursor === "string" && args.cursor !== "" ? args.cursor : void 0;
5505
+ return { limit: clampListLimit(args.limit), ...cursor ? { cursor } : {} };
5506
+ }
5507
+ function serverPagination(pagination, returned) {
5508
+ const hasNextPage = pagination?.hasNextPage === true;
5509
+ return {
5510
+ returned,
5511
+ hasNextPage,
5512
+ nextCursor: pagination?.nextCursor ?? null,
5513
+ ...hasNextPage ? { note: "More results exist. Pass cursor=nextCursor to fetch them." } : {}
5514
+ };
5515
+ }
5516
+ function decodeCursorOffset(cursor) {
5517
+ if (!cursor) return 0;
5518
+ try {
5519
+ const decoded = Buffer.from(cursor, "base64").toString("utf8");
5520
+ if (!/^\d+$/.test(decoded)) return 0;
5521
+ const offset = Number.parseInt(decoded, 10);
5522
+ return Number.isFinite(offset) && offset >= 0 ? offset : 0;
5523
+ } catch {
5524
+ return 0;
5525
+ }
5526
+ }
5527
+ function encodeCursorOffset(offset) {
5528
+ return Buffer.from(String(offset), "utf8").toString("base64");
5529
+ }
5530
+ function capList(items, options, extra) {
5531
+ const limit = clampListLimit(options.limit);
5532
+ const offset = decodeCursorOffset(options.cursor);
5533
+ const total = items.length;
5534
+ const page = items.slice(offset, offset + limit);
5535
+ const nextOffset = offset + page.length;
5536
+ const hasMore = nextOffset < total;
5537
+ const { items: _i, pagination: _p, ...safeExtra } = extra ?? {};
5538
+ void _i;
5539
+ void _p;
5540
+ return {
5541
+ ...safeExtra,
5542
+ items: page,
5543
+ pagination: {
5544
+ total,
5545
+ returned: page.length,
5546
+ offset,
5547
+ truncated: hasMore,
5548
+ nextCursor: hasMore ? encodeCursorOffset(nextOffset) : null,
5549
+ ...hasMore ? {
5550
+ note: `Showing ${page.length} of ${total}. Pass cursor=nextCursor to fetch more, or narrow the query with filters.`
5551
+ } : {}
5552
+ }
5553
+ };
5554
+ }
5275
5555
 
5276
5556
  // src/specgen/tools/capacity.ts
5277
5557
  var CUDA_VERSION_REGEX = /^\d{1,2}\.\d{1,2}$/;
@@ -5308,6 +5588,7 @@ function rankByStock(rows, stats, includeUnavailable) {
5308
5588
  var getCapacity = {
5309
5589
  name: "get-capacity",
5310
5590
  title: "Get GPU capacity by CUDA version",
5591
+ directoryDescription: "GPU capacity across host CUDA versions, as a matrix. By default one call returns, for each GPU type, overall stock plus AVAILABLE or UNAVAILABLE per host CUDA version. With cudaVersions it checks each listed version and returns graded stock (High, Medium, Low, Out) and the lowest on-demand price per version; a check that fails transiently reports an error for that version only. Out-of-stock GPUs are included unless includeUnavailable is false. Live public catalog data, so page cursors can shift between calls.",
5311
5592
  annotations: readOnly,
5312
5593
  description: "GPU capacity across host CUDA versions, as a matrix. Use this to choose an endpoint's allowedCudaVersions/minCudaVersion (or diagnose/widen a capacity-starved one) and to distinguish capacity problems from compatibility problems. Default mode is one call returning, per GPU type, overall stock plus AVAILABLE/UNAVAILABLE per host-reported CUDA version. Pass cudaVersions to deep-probe instead: one stock lookup per listed version, returning graded stock (High/Medium/Low/Out) and the lowest on-demand price per version; a probe that fails transiently reports a per-version error instead of failing the call. Nothing is hidden by default \u2014 set includeUnavailable:false to drop GPUs with no stock on any listed version. Credential-free public catalog data. Stock is live, so page cursors can shift between calls.",
5313
5594
  inputSchema: {
@@ -5510,7 +5791,9 @@ function formatGpuIds(gpu) {
5510
5791
  var setEndpointGpus = {
5511
5792
  name: "set-endpoint-gpus",
5512
5793
  title: "Set endpoint GPUs",
5513
- annotations: idempotentWrite,
5794
+ directoryDescription: "Set which GPUs a Serverless endpoint's workers run on, including pinning specific GPU types. Takes either a raw gpuIds string, or pools plus optional excludeGpuTypeIds, from which the exclusion string is built: a pool allows every GPU type in it, and excluding all but one pins that type. Changes only GPU settings and keeps the endpoint's other settings.",
5795
+ // Replaces the whole GPU selection: exclusions not resent are cleared.
5796
+ annotations: destructive,
5514
5797
  description: "Set which GPUs a Serverless endpoint's workers run on \u2014 including pinning specific GPU SKUs. Provide either a raw gpuIds string, or pools plus optional excludeGpuTypeIds (GPU type ids from list-gpu-types) and the exclusion string is built for you: a pool allows every SKU in it, and excluding all but one SKU pins that SKU exactly. Updates only GPU settings through REST v2, preserving other endpoint settings. create-endpoint/update-endpoint also support gpu.excludedTypes.",
5515
5798
  inputSchema: {
5516
5799
  type: "object",
@@ -5705,6 +5988,7 @@ function randomSuffix() {
5705
5988
  var listHubRepos = {
5706
5989
  name: "list-hub-repos",
5707
5990
  title: "List Hub repos",
5991
+ directoryDescription: "List repos published to the Runpod Hub (prebuilt Serverless workers and Pod templates, such as vLLM and ComfyUI), sorted by deploy count. Public catalog; no sign-in needed. Each result includes the listed release with its hubReleaseId and image name. includeConfig: true adds each release's config (hardware requirements and environment-variable schema), which is large; repoOwner and searchTerm narrow the list.",
5708
5992
  annotations: readOnly,
5709
5993
  description: "List repos published to the Runpod Hub (prebuilt Serverless workers and Pod templates, e.g. vLLM, ComfyUI). Public catalog \u2014 no auth required. Each result includes the currently listed release with its hubReleaseId and prebuilt image name. Results are sorted by deploy count (most popular first). Set includeConfig:true to also return the release config (hardware requirements and environment-variable schema) \u2014 it is large, so prefer requesting it for a single repo via the repoOwner/searchTerm filters.",
5710
5994
  inputSchema: {
@@ -5808,6 +6092,7 @@ var listHubRepos = {
5808
6092
  var deployHubRepo = {
5809
6093
  name: "deploy-hub-repo",
5810
6094
  title: "Deploy Hub repo",
6095
+ directoryDescription: `Deploy a Runpod Hub repo's listed release as a new Serverless endpoint, the same as clicking Deploy on the Hub. Identifies the repo by repo ("owner/name") or hubReleaseId. The release supplies the image, container disk, CUDA constraints and environment-variable defaults; env overrides or fills in values, and keys the release requires without a default have to be supplied. GPUs come from the release config when it sets them, otherwise from gpuIds (pool names such as 'ADA_24'). Billable while the endpoint's workers run.`,
5811
6096
  // Two sequential upstream calls: together they can outlast a client's request timeout.
5812
6097
  holdsResponse: true,
5813
6098
  annotations: write,
@@ -6269,6 +6554,7 @@ function validateWait(wait) {
6269
6554
  var runEndpoint = {
6270
6555
  name: "run-endpoint",
6271
6556
  title: "Submit Serverless job",
6557
+ directoryDescription: "Submit an asynchronous job to a Serverless endpoint. Returns a job ID immediately; the result stays available for 30 minutes after the job completes.",
6272
6558
  annotations: write,
6273
6559
  description: "Submit an asynchronous job to a Serverless endpoint. Returns a job ID immediately \u2014 use get-job-status to poll for results (pass its `wait` to block through a cold start instead of tight-looping). Async results are available for 30 minutes after completion.",
6274
6560
  inputSchema: {
@@ -6300,6 +6586,7 @@ var runEndpoint = {
6300
6586
  var runsyncEndpoint = {
6301
6587
  name: "runsync-endpoint",
6302
6588
  title: "Run Serverless job and wait",
6589
+ directoryDescription: `Submit a synchronous job to a Serverless endpoint and wait up to ${HTTP_LONG_POLL_BUDGET_MS} ms for the result. If the job outlives the wait, the response carries the job ID and its current status (IN_QUEUE or IN_PROGRESS). Maximum payload 20 MB; results expire 1 minute after completion.`,
6303
6590
  holdsResponse: true,
6304
6591
  annotations: write,
6305
6592
  description: "Submit a synchronous job to a Serverless endpoint and wait for the result. Best for fast tasks: if the job outlives the wait, the response returns a job ID and a non-terminal status (IN_QUEUE or IN_PROGRESS) to poll with get-job-status. Max payload 20 MB; results expire after 1 minute. The wait parameter extends the server-side wait" + (HOSTED ? ` \u2014 this server runs behind a 60-second gateway deadline, so waits clamp to ${HTTP_LONG_POLL_BUDGET_MS} ms, which is also the effective default. For longer jobs use run-endpoint + get-job-status.` : " to up to 5 minutes (300000 ms); it defaults to 90000 (90 seconds)."),
@@ -6346,6 +6633,7 @@ var runsyncEndpoint = {
6346
6633
  var getJobStatus = {
6347
6634
  name: "get-job-status",
6348
6635
  title: "Get job status",
6636
+ directoryDescription: `Get the status of a Serverless job, and its output once it completes. Statuses: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED, CANCELLED, TIMED_OUT. With wait (milliseconds, up to ${HTTP_LONG_POLL_BUDGET_MS}) the server polls until the job reaches a final status or the wait runs out, in which case it returns the latest status with pollingTimedOut: true; without wait it returns the current status at once. An IN_QUEUE result includes a workerHealth summary of the endpoint's workers.`,
6349
6637
  holdsResponse: true,
6350
6638
  annotations: readOnly,
6351
6639
  description: "Check the status of a Serverless job. Returns the current status and output when complete. Job statuses: IN_QUEUE, IN_PROGRESS, COMPLETED, FAILED, CANCELLED, TIMED_OUT. Pass `wait` (milliseconds, up to " + STATUS_WAIT_MAX_MS + ") to BLOCK server-side, polling until the job reaches a terminal status or the budget expires \u2014 use it to ride out a cold start (a first job on a fresh worker pulls the image and loads the model, commonly 1\u20135+ minutes) in a single call instead of returning on the first IN_QUEUE and tight-looping the tool. Without `wait` it returns the current status immediately (a single check). If the budget expires before a terminal status, it returns the latest non-terminal status with pollingTimedOut:true \u2014 call again (with `wait`) to keep blocking. IMPORTANT: a job stuck IN_QUEUE does not necessarily mean a capacity shortage \u2014 a worker may have spun up and crash-looped. When the job is IN_QUEUE this tool attaches a workerHealth summary and a hint. To dig deeper call list-endpoint-workers, then read stream-worker-logs regardless of the status a worker reports: a container failing to start loops while its worker still shows RUNNING or THROTTLED and unhealthy stays 0, so UNHEALTHY is one symptom of a crash loop and not a test for it. The logs are the authority.",
@@ -6396,8 +6684,11 @@ var getJobStatus = {
6396
6684
  var streamJob = {
6397
6685
  name: "stream-job",
6398
6686
  title: "Stream job output",
6687
+ directoryDescription: `Collect streaming output from a Serverless job whose worker streams its output. Polls the job's stream until it reaches COMPLETED, FAILED, CANCELLED or TIMED_OUT, for up to ${formatBudget(HTTP_LONG_POLL_BUDGET_MS)}; if time runs out first, it returns the chunks collected so far with pollingTimedOut: true, and a later call resumes where it left off.`,
6399
6688
  holdsResponse: true,
6400
- annotations: readOnly,
6689
+ // Not a read: /stream hands out each chunk once, so a chunk collected by a
6690
+ // call whose response is lost cannot be fetched again.
6691
+ annotations: destructiveWrite,
6401
6692
  description: `Retrieve streaming output from a Serverless job. The worker must support streaming output. Polls /stream/{jobId} and collects chunks until the status is COMPLETED, FAILED, CANCELLED, or TIMED_OUT, for up to ${formatBudget(STREAM_BUDGET_MS)}. If the budget expires first, returns the chunks collected so far with pollingTimedOut: true \u2014 call stream-job again to resume where it left off, or get-job-status to check without streaming.`,
6402
6693
  inputSchema: {
6403
6694
  type: "object",
@@ -6455,7 +6746,8 @@ var cancelJob = {
6455
6746
  var retryJob = {
6456
6747
  name: "retry-job",
6457
6748
  title: "Retry job",
6458
- annotations: write,
6749
+ // Removes the previous output before requeueing.
6750
+ annotations: destructiveWrite,
6459
6751
  description: "Retry a failed or timed-out Serverless job. Only works for jobs with FAILED or TIMED_OUT status. The previous output is removed and the job is requeued.",
6460
6752
  inputSchema: {
6461
6753
  type: "object",
@@ -6481,6 +6773,7 @@ var retryJob = {
6481
6773
  var endpointHealth = {
6482
6774
  name: "endpoint-health",
6483
6775
  title: "Get endpoint health",
6776
+ directoryDescription: "Get the health rollup for a Serverless endpoint: worker counts by state and job queue statistics. The rollup can lag the per-worker state, and a worker whose container keeps failing to start can still report RUNNING or THROTTLED here. Zero workers means the endpoint is waiting for GPU capacity.",
6484
6777
  annotations: readOnly,
6485
6778
  description: "Get the endpoint-level health rollup for a Serverless endpoint: worker counts by state plus job queue statistics. This is the runtime plane's own /health view and it can lag or disagree with the per-worker truth \u2014 when a job is stuck IN_QUEUE, prefer list-endpoint-workers over this rollup for per-worker state \u2014 but treat neither as the authority on crash loops, because a container failing to start loops while its worker reports RUNNING or THROTTLED and unhealthy stays 0; stream-worker-logs is what settles it, and note that get-job-status already attaches that worker summary and a hint on every IN_QUEUE result. Zero workers here means the endpoint is waiting for GPU capacity.",
6486
6779
  inputSchema: {
@@ -6502,6 +6795,7 @@ var endpointHealth = {
6502
6795
  var purgeEndpointQueue = {
6503
6796
  name: "purge-endpoint-queue",
6504
6797
  title: "Purge endpoint queue",
6798
+ directoryDescription: "Remove all queued jobs from a Serverless endpoint. Jobs already in progress keep running.",
6505
6799
  annotations: destructive,
6506
6800
  description: "Remove all pending jobs from a Serverless endpoint queue. Only affects queued jobs \u2014 in-progress jobs continue running. Use this for error recovery or clearing outdated requests.",
6507
6801
  inputSchema: {
@@ -6539,6 +6833,7 @@ var jobTools = [
6539
6833
  var listEndpoints = {
6540
6834
  name: "list-endpoints",
6541
6835
  title: "List endpoints",
6836
+ directoryDescription: "List the Serverless endpoints the account owns, trimmed to id, name, image, compute config, worker counts, scaling and data centers; environment variables and request URLs are left out. Returns one page at a time; cursor=nextCursor returns the next page.",
6542
6837
  annotations: readOnly,
6543
6838
  description: "List serverless endpoints owned by the account (trimmed: id, name, image, compute config, worker counts, scaling, data centers per endpoint \u2014 env vars and request URLs are omitted; use get-endpoint for the full object). Returns a page; pass cursor=nextCursor for more.",
6544
6839
  inputSchema: {
@@ -6585,6 +6880,7 @@ var listEndpoints = {
6585
6880
  var listTemplates = {
6586
6881
  name: "list-templates",
6587
6882
  title: "List templates",
6883
+ directoryDescription: "List the templates visible to the account, with id, name, image and Serverless flag for each. Returns 20 templates per page by default; pagination.nextCursor returns the next page, and a template missing from one page can be on a later one.",
6588
6884
  annotations: readOnly,
6589
6885
  description: "List templates visible to the account. Returns id, name, image, and serverless flag per template; use get-template for full detail. Returns 20 templates per page by default. To find a template, follow `pagination.nextCursor` until `hasNextPage` is false: a name missing from one page may be on a later one.",
6590
6886
  inputSchema: {
@@ -6619,7 +6915,7 @@ var listTemplates = {
6619
6915
  }
6620
6916
  };
6621
6917
 
6622
- // node_modules/.pnpm/@runpod+typescript-api-sdk@0.3.0/node_modules/@runpod/typescript-api-sdk/dist/index.js
6918
+ // packages/typescript-api-sdk/dist/index.js
6623
6919
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
6624
6920
  var supportsRequestInitExt = () => {
6625
6921
  return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
@@ -7191,10 +7487,7 @@ var Parser = class {
7191
7487
  parseItem(standaloneItem = true) {
7192
7488
  if (standaloneItem)
7193
7489
  this.skipWS();
7194
- const result = [
7195
- this.parseBareItem(),
7196
- this.parseParameters()
7197
- ];
7490
+ const result = [this.parseBareItem(), this.parseParameters()];
7198
7491
  if (standaloneItem)
7199
7492
  this.checkTrail();
7200
7493
  return result;
@@ -7214,10 +7507,7 @@ var Parser = class {
7214
7507
  this.skipWS();
7215
7508
  if (this.lookChar() === ")") {
7216
7509
  this.pos++;
7217
- return [
7218
- innerList,
7219
- this.parseParameters()
7220
- ];
7510
+ return [innerList, this.parseParameters()];
7221
7511
  }
7222
7512
  innerList.push(this.parseItem(false));
7223
7513
  const nextChar = this.lookChar();
@@ -7804,7 +8094,6 @@ var LogEventParser = class {
7804
8094
  constructor(maxEventBytes) {
7805
8095
  this.maxEventBytes = maxEventBytes;
7806
8096
  }
7807
- maxEventBytes;
7808
8097
  line = "";
7809
8098
  dataLines = [];
7810
8099
  eventName = "";
@@ -8048,6 +8337,7 @@ var streamPodLogs = {
8048
8337
  var streamWorkerLogs = {
8049
8338
  name: "stream-worker-logs",
8050
8339
  title: "Stream worker logs",
8340
+ directoryDescription: "Read a bounded snapshot of a Serverless worker's logs (container, system, or both). Holds the live stream open for maxWaitMs and returns the parsed log lines; truncated: true means the byte cap cut the output. A worker whose container keeps failing to start can report RUNNING or THROTTLED while its logs show the failure.",
8051
8341
  holdsResponse: true,
8052
8342
  annotations: readOnly,
8053
8343
  description: "Read a bounded snapshot of a Serverless worker's logs (container and/or system source). Holds the live stream open for maxWaitMs and returns the parsed log lines; `truncated: true` means the byte cap cut the output. Get worker IDs from list-endpoint-workers. Use this whenever a job stays IN_QUEUE while workers exist, whatever status they report \u2014 a crash-looping container often still shows RUNNING or THROTTLED with unhealthy 0, so these logs, not the worker status, are what identify a crash loop.",
@@ -8091,6 +8381,7 @@ function parseMetadata(metadata) {
8091
8381
  var listPublicEndpoints = {
8092
8382
  name: "list-public-endpoints",
8093
8383
  title: "List public endpoints",
8384
+ directoryDescription: "List Runpod Public Endpoints: managed, pay-per-use model APIs (text, image, video, audio) that need no deployment. Public catalog; no sign-in needed. Each result includes its endpointId, model name, modality, owner and pricing. Only live endpoints are listed unless includeOffline is true.",
8094
8385
  annotations: readOnly,
8095
8386
  description: "List Runpod Public Endpoints \u2014 managed, pay-per-use model APIs (text, image, video, audio) that require no deployment. Public catalog, no auth required. Each result includes the endpointId to call with run-endpoint/runsync-endpoint (or via https://api.runpod.ai/v2/{endpointId}), the model name, modality, owner, and pricing. Only live endpoints are returned by default; set includeOffline:true to also list ones that are not currently live.",
8096
8387
  inputSchema: {
@@ -8391,6 +8682,7 @@ var readGuide = {
8391
8682
  var lookupConcept = {
8392
8683
  name: "lookup-concept",
8393
8684
  title: "Look up a concept",
8685
+ directoryDescription: "Look up one Runpod concept (Pod, network volume, machine, worker, template and so on) by id, name or alias; case, plurals and small typos are tolerated, and matched_as shows the key used when the match was not exact. Returns its summary, fields, states, relations and rules, each rule with its public source, plus the concepts that point at it. Answers exact questions such as whether a volume disk is tied to one machine.",
8394
8686
  annotations: bundledRead,
8395
8687
  recordedArguments: ["concept"],
8396
8688
  description: 'Look up one Runpod concept (pod, network volume, machine, worker, template, \u2026) by id, name or alias; case, plurals and small typos are tolerated, and `matched_as` shows the key used when the match was not exact. Returns its summary, fields, states, relations and rules, each rule with the public source it comes from, the concepts that point at it, and the linked guides: examples (golden paths that use it, with their mcp level) and docs (skills and reference docs that explain it). Use it for exact facts, for example "is a volume disk tied to one machine" or "what happens to a stopped pod\'s GPU".',
@@ -8445,6 +8737,7 @@ var lookupConcept = {
8445
8737
  var searchConcepts = {
8446
8738
  name: "search-concepts",
8447
8739
  title: "Search concepts",
8740
+ directoryDescription: 'Search the rules of the Runpod concept graph by words, for example "restart stopped pod no gpu" or "network volume data center". Returns the best-matching rules with their concept and public evidence.',
8448
8741
  annotations: bundledRead,
8449
8742
  recordedArguments: ["query", "limit"],
8450
8743
  description: 'Search the rules of the Runpod concept graph by words, for example "restart stopped pod no gpu" or "network volume data center". Returns the best-matching rules with their concept and public evidence. Follow up with lookup-concept for the full concept.',
@@ -8535,9 +8828,23 @@ function listedAnnotations(annotations) {
8535
8828
  const { idempotentHint, ...listed } = annotations;
8536
8829
  return idempotentHint ? annotations : listed;
8537
8830
  }
8538
- function listTool(tool) {
8539
- const { name, title, description, inputSchema } = tool;
8540
- const annotations = listedAnnotations(tool.annotations);
8831
+ function listTool(tool, profile = "default") {
8832
+ const { name, title, inputSchema } = tool;
8833
+ const annotations = { title, ...listedAnnotations(tool.annotations) };
8834
+ if (profile === "directory")
8835
+ return {
8836
+ name,
8837
+ title,
8838
+ description: withApiReference(
8839
+ tool.directoryDescription ?? tool.description,
8840
+ inputSchema
8841
+ ),
8842
+ inputSchema: withoutCredentialExamples(
8843
+ withoutInputs(inputSchema, directoryOmittedInputs(name))
8844
+ ),
8845
+ annotations
8846
+ };
8847
+ const { description } = tool;
8541
8848
  if (!tool.schemaOnDemand)
8542
8849
  return { name, title, description, inputSchema, annotations };
8543
8850
  return {
@@ -8548,6 +8855,36 @@ function listTool(tool) {
8548
8855
  annotations
8549
8856
  };
8550
8857
  }
8858
+ var DIRECTORY_API_REFERENCE = "Calls the Runpod REST API v2: https://docs.runpod.io/api-reference-v2/overview";
8859
+ function withApiReference(description, schema) {
8860
+ const properties = schema.properties ?? {};
8861
+ if (!("body" in properties)) return description;
8862
+ const trimmed = description.replace(/\s*$/, "");
8863
+ const sentence = /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;
8864
+ return `${sentence} ${DIRECTORY_API_REFERENCE}`;
8865
+ }
8866
+ var CREDENTIAL = /pass(word|wd|phrase)?|secret|token(?!s)|api_?key|private_?key|credential/i;
8867
+ function withoutCredentialExamples(schema) {
8868
+ const strip = (node) => {
8869
+ if (Array.isArray(node)) return node.map(strip);
8870
+ if (!node || typeof node !== "object") return node;
8871
+ const out = {};
8872
+ for (const [key, value] of Object.entries(node)) {
8873
+ if (key === "examples" && CREDENTIAL.test(JSON.stringify(value)))
8874
+ continue;
8875
+ out[key] = strip(value);
8876
+ }
8877
+ return out;
8878
+ };
8879
+ return strip(schema);
8880
+ }
8881
+ function withoutInputs(schema, omit) {
8882
+ if (!omit.length) return schema;
8883
+ const properties = { ...schema.properties ?? {} };
8884
+ for (const key of omit) delete properties[key];
8885
+ const required = Array.isArray(schema.required) ? schema.required.filter((key) => !omit.includes(key)) : schema.required;
8886
+ return { ...schema, properties, ...required ? { required } : {} };
8887
+ }
8551
8888
  function callShape(schema) {
8552
8889
  const defs = schema.$defs ?? {};
8553
8890
  const resolve = (node) => {
@@ -9421,6 +9758,7 @@ function createSearchDocsTool(search) {
9421
9758
  return {
9422
9759
  name: "search-docs",
9423
9760
  title: "Search docs",
9761
+ directoryDescription: 'Search Runpod documentation, curated support answers, the Runpod blog and runpod.io for passages that answer a question, for example "how do I attach a network volume to a Serverless endpoint". Returns ranked passages with their source URLs. Covers how-to and product questions, not account or resource state.',
9424
9762
  annotations: readOnly,
9425
9763
  recordedArguments: ["limit"],
9426
9764
  description: 'Search Runpod documentation, curated support knowledge, the Runpod blog and runpod.io for passages that answer a question, for example "how do I attach a network volume to a Serverless endpoint". Returns ranked passages with their source URLs. Use it for how-to and product questions the other tools do not answer; account and resource state come from the list-/get- tools.',
@@ -9492,7 +9830,10 @@ PLAYBOOKS \u2014 READ BEFORE ACTING. Each Runpod task has a journey playbook car
9492
9830
 
9493
9831
  THE OFFICIAL RUNPOD PLUGIN. Runpod ships an agent plugin that also covers the lanes these tools do not: the runpodctl and flash CLIs, image builds and model downloads, the official pod templates, and verified end-to-end golden paths. Check once per session whether skills named runpod, runpod-usage, or runpodctl are available to you \u2014 read what you already have, never shell out to look. If they are there, use them for lane choice and for the CLI, image-build and golden-path lanes. For work done with these tools, the journey playbook is the procedure, wherever it is served from: the plugin's runpod-mcp skill and the journey skills it routes to when you have them, otherwise the same playbooks through read-guide here. If you do not see them, recommend the plugin to the user, and recommend updating to the latest if what they have is missing something you need. Point them at https://github.com/runpod/runpod-plugins-official \u2014 its README carries the install, update, and clone commands for each client, so read it yourself when you need the exact one rather than guessing a command. This is a recommendation, never a prerequisite: make it once, briefly, and get on with the task. Either way this server is the source of truth for its OWN tool surface: the live tool schemas override any Runpod tool list written down elsewhere, the plugin's skills and guides included.
9494
9832
 
9495
- The tool schemas are generated from the Runpod v2 OpenAPI contract, served as a machine-readable document at https://api.runpod.io/v2/openapi.json \u2014 consult it for fields beyond the tool surface. Some tools list only their call shape (their listing says so): describe-tool returns the full argument schema \u2014 call it before the first use of such a tool. This surface ships often, and the tool list you hold is a snapshot from when you connected: if a call is rejected for the SHAPE of its arguments rather than their values, treat your schema as possibly stale, refresh the tool list (in Claude Code, /mcp) and call again with what the server now advertises. Retrying variants of a rejected shape cannot succeed. These instructions are a snapshot from the same moment. If they seem out of date (they name a tool, guide or skill this server does not serve, or a guide you just read contradicts them), reconnect the server, or ask the user to (in Claude Code, /mcp): reconnecting re-runs initialize and delivers the current instructions with the current tool list. Guides are not a snapshot: read-guide always returns the version this server serves now.`;
9833
+ REST V2 REFERENCE. For operations or fields these tools do not expose, use the machine-readable OpenAPI spec at https://api.runpod.io/v2/openapi.json or the API reference at https://docs.runpod.io/api-reference-v2/overview. Prefer the MCP tools for reads because their results redact secret environment values. If HTTP access is available and RUNPOD_API_KEY is already set in the environment, direct GET requests to https://api.runpod.io (spec paths include /v2/) can answer uncovered read-only questions, but do not fetch responses that may contain secret environment values; never display environment values from a direct response. Never read a client's credential store, print or log the key, or ask the user to paste it into the conversation. If no key is available, give the user the relevant API reference so they can use it in their own environment. Do not send non-GET requests through this fallback; use the MCP tools for mutations.
9834
+
9835
+ The tool schemas are generated from that OpenAPI contract. Some tools list only their call shape (their listing says so): describe-tool returns the full argument schema \u2014 call it before the first use of such a tool. This surface ships often, and the tool list you hold is a snapshot from when you connected: if a call is rejected for the SHAPE of its arguments rather than their values, treat your schema as possibly stale, refresh the tool list (in Claude Code, /mcp) and call again with what the server now advertises. Retrying variants of a rejected shape cannot succeed. These instructions are a snapshot from the same moment. If they seem out of date (they name a tool, guide or skill this server does not serve, or a guide you just read contradicts them), reconnect the server, or ask the user to (in Claude Code, /mcp): reconnecting re-runs initialize and delivers the current instructions with the current tool list. Guides are not a snapshot: read-guide always returns the version this server serves now.`;
9836
+ var DIRECTORY_INSTRUCTIONS = `These tools manage a Runpod account: the compute catalog (GPU and CPU types, data centers, live stock and pricing), Pods, Serverless endpoints and their jobs, Instant Clusters, templates, network and global volumes, billing history, Public Endpoints, and the Runpod Hub. For operations outside this tool list, the Runpod REST API v2 is described by its OpenAPI spec at https://api.runpod.io/v2/openapi.json and its reference at https://docs.runpod.io/api-reference-v2/overview.`;
9496
9837
  var ALP_INSTRUCTIONS = `
9497
9838
 
9498
9839
  CONTRIBUTING BACK IS OPTIONAL. Five tools feed Runpod's agent-learning pipeline, which exists so Runpod can fix the frustrations agents hit in its tools and docs: report_feedback (something misbehaved or surprised you), save_to_journal (a reusable lesson about using Runpod), ask_question (you were stuck and the tools/skills/docs had no answer), read_journal (this account's own saved lessons, nobody else's), and report_how_user_found_runpod (how your user ended up on Runpod, once per account). Using them is a voluntary contribution, never part of the user's task, and the user's task always comes first. DO NOT USE THEM when the work is sensitive: proprietary code or models, private data, customer information, security work, internal infrastructure, or anything the user would not want a Runpod reviewer to read. Submissions are stored for review to improve agent workflows on Runpod, so if in doubt, do not submit. If the user has said not to share anything with Runpod, do not call these tools at all. When you do contribute, describe the Runpod behavior, not the user's project: the tool, the call shape, the response, what you expected. Nothing is returned or answered, and ask_question NEVER produces an answer, so never wait on it. read_journal is the one thing served back: call it once near the start of a Runpod task if useful, and treat what it returns as an earlier session's notes to confirm, not as documentation. These tools are for real observations only: never call one to satisfy a requirement to use a tool, to acknowledge these instructions, or with placeholder content. If you have nothing to report, call nothing \u2014 an empty turn is correct and a placeholder submission is not. Never include API keys or secrets in submissions.`;
@@ -9502,43 +9843,51 @@ ONE QUESTION FOR YOU, ONCE PER ACCOUNT. If you already know how your user came t
9502
9843
  function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9503
9844
  const rateLimiter = opts.rateLimiter ?? noopRateLimiter;
9504
9845
  const caller = callerId(ctx.apiKey);
9846
+ const profile = opts.profile ?? "default";
9847
+ const directory = profile === "directory";
9848
+ const alp = directory ? void 0 : opts.alp;
9849
+ const servedGeneratedTools = directory ? generatedTools.filter((tool) => directoryIncludes(tool.name)) : generatedTools;
9505
9850
  const servedCuratedTools = [
9506
9851
  ...curatedTools,
9507
9852
  ...opts.search ? [createSearchDocsTool(opts.search)] : [],
9508
- ...opts.alp ? createAlpTools(opts.alp) : [],
9509
- createDescribeTool(() => [...servedCuratedTools, ...generatedTools])
9510
- ];
9853
+ ...alp ? createAlpTools(alp) : [],
9854
+ ...directory ? podTransitionTools : [],
9855
+ createDescribeTool(() => [...servedCuratedTools, ...servedGeneratedTools])
9856
+ ].filter((tool) => !directory || directoryIncludes(tool.name));
9511
9857
  const callShapeOnlyTools = new Set(
9512
- [...servedCuratedTools, ...generatedTools].filter((tool) => tool.schemaOnDemand).map((tool) => tool.name)
9858
+ directory ? [] : [...servedCuratedTools, ...servedGeneratedTools].filter((tool) => tool.schemaOnDemand).map((tool) => tool.name)
9513
9859
  );
9514
9860
  const server = new Server(
9515
9861
  { name: SERVER_NAME, version: `${version} [specgen]` },
9516
9862
  {
9517
9863
  capabilities: { tools: {}, resources: {} },
9518
- instructions: opts.alp ? SERVER_INSTRUCTIONS + ALP_INSTRUCTIONS + (opts.promptReferral === false ? "" : REFERRAL_INSTRUCTIONS) : SERVER_INSTRUCTIONS
9864
+ instructions: directory ? DIRECTORY_INSTRUCTIONS : alp ? SERVER_INSTRUCTIONS + ALP_INSTRUCTIONS + (opts.promptReferral === false ? "" : REFERRAL_INSTRUCTIONS) : SERVER_INSTRUCTIONS
9519
9865
  }
9520
9866
  );
9521
9867
  server.oninitialized = () => {
9522
9868
  const clientInfo = server.getClientVersion();
9523
9869
  if (clientInfo?.name) {
9524
9870
  ctx.setClientInfo?.(clientInfo.name, clientInfo.version);
9525
- if (opts.alp) {
9526
- opts.alp.harness = clientInfo.version ? `${clientInfo.name}/${clientInfo.version}` : clientInfo.name;
9527
- opts.alp.harnessSource = "client_info";
9871
+ if (alp) {
9872
+ alp.harness = clientInfo.version ? `${clientInfo.name}/${clientInfo.version}` : clientInfo.name;
9873
+ alp.harnessSource = "client_info";
9528
9874
  }
9529
9875
  }
9530
9876
  };
9531
9877
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
9532
- tools: [...servedCuratedTools, ...generatedTools].map(listTool)
9878
+ tools: [...servedCuratedTools, ...servedGeneratedTools].map(
9879
+ (tool) => listTool(tool, profile)
9880
+ )
9533
9881
  }));
9882
+ const servedGuides = directory ? [] : guideResources;
9534
9883
  server.setRequestHandler(ListResourcesRequestSchema, async () => ({
9535
- resources: guideResources.map(({ text: _text, ...resource }) => resource)
9884
+ resources: servedGuides.map(({ text: _text, ...resource }) => resource)
9536
9885
  }));
9537
9886
  server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
9538
9887
  resourceTemplates: []
9539
9888
  }));
9540
9889
  server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
9541
- const guide = guideResources.find(
9890
+ const guide = servedGuides.find(
9542
9891
  (candidate) => candidate.uri === request.params.uri
9543
9892
  );
9544
9893
  if (opts.analytics) {
@@ -9598,7 +9947,14 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9598
9947
  const curated = servedCuratedTools.find(
9599
9948
  (tool) => tool.name === request.params.name
9600
9949
  );
9601
- const rejected = curated && !curated.lenientArguments ? validateArguments(
9950
+ const omitted = directory ? directoryOmittedInputs(request.params.name).filter((key) => key in args) : [];
9951
+ const rejected = omitted.length ? {
9952
+ ok: false,
9953
+ status: 400,
9954
+ payload: {
9955
+ error: `Not accepted on this server: ${omitted.join(", ")}.`
9956
+ }
9957
+ } : curated && !curated.lenientArguments ? validateArguments(
9602
9958
  curated.inputSchema,
9603
9959
  args
9604
9960
  ) : null;
@@ -9618,21 +9974,28 @@ function createSpecgenServer(ctx, version = "0.1.0", opts = {}) {
9618
9974
  ok: result.ok,
9619
9975
  status: result.status,
9620
9976
  durationMs: Date.now() - startedAt,
9621
- args: recordedArgumentValues(curated?.recordedArguments, args),
9622
- guideKind: curated?.recordedGuideKind?.(args),
9977
+ // The directory profile records which tool ran, never what was asked.
9978
+ ...directory ? {} : {
9979
+ args: recordedArgumentValues(curated?.recordedArguments, args),
9980
+ guideKind: curated?.recordedGuideKind?.(args)
9981
+ },
9623
9982
  ...opts.analytics
9624
9983
  });
9625
9984
  }
9626
9985
  opts.onToolResult?.(request.params.name, result.status);
9627
9986
  if (!result.ok && result.status === 401) opts.onUnauthorized?.();
9628
- const payload = result.ok ? result.payload : withRecoveryHint(result, callShapeOnlyTools.has(request.params.name));
9987
+ const payload = redactSecretEnv(
9988
+ result.ok ? result.payload : withRecoveryHint(result, callShapeOnlyTools.has(request.params.name))
9989
+ );
9629
9990
  return {
9630
9991
  content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
9631
9992
  isError: !result.ok
9632
9993
  };
9633
9994
  });
9634
9995
  async function dispatchTool(name, args) {
9635
- const tool = generatedTools.find((candidate) => candidate.name === name);
9996
+ const tool = servedGeneratedTools.find(
9997
+ (candidate) => candidate.name === name
9998
+ );
9636
9999
  if (!tool)
9637
10000
  return {
9638
10001
  ok: false,
@@ -9730,7 +10093,7 @@ if (subcommand === "--version" || subcommand === "-v") {
9730
10093
  ].join("\n")
9731
10094
  );
9732
10095
  } else if (isWizardMode) {
9733
- import("./wizard-KKTBTVXE.mjs").then(async ({ runWizard }) => {
10096
+ import("./wizard-NVV3UNOG.mjs").then(async ({ runWizard }) => {
9734
10097
  process.exitCode = await runWizard(subcommand);
9735
10098
  }).catch((error) => {
9736
10099
  console.error(error instanceof Error ? error.message : String(error));