@nirvana-labs/nirvana-mcp 1.65.0 → 1.67.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.
@@ -946,6 +946,75 @@ const EMBEDDED_METHODS: MethodEntry[] = [
946
946
  },
947
947
  },
948
948
  },
949
+ {
950
+ name: 'get',
951
+ endpoint: '/v1/instance_types/{region}/{name}',
952
+ httpMethod: 'get',
953
+ summary: 'Get Instance Type',
954
+ description: 'Get an instance type by region and name',
955
+ stainlessPath: '(resource) instance_types > (method) get',
956
+ qualified: 'client.instanceTypes.get',
957
+ params: ["region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1';", 'name: string;'],
958
+ response:
959
+ "{ chipset: string; created_at: string; memory_gi: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; updated_at: string; vcpu: number; }",
960
+ markdown:
961
+ "## get\n\n`client.instanceTypes.get(region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', name: string): { chipset: string; created_at: string; memory_gi: number; name: string; region: region_name; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types/{region}/{name}`\n\nGet an instance type by region and name\n\n### Parameters\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n\n- `name: string`\n\n### Returns\n\n- `{ chipset: string; created_at: string; memory_gi: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `memory_gi: number`\n - `name: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `updated_at: string`\n - `vcpu: number`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType);\n```",
962
+ perLanguage: {
963
+ cli: {
964
+ method: 'instance_types get',
965
+ example:
966
+ "nirvana instance-types get \\\n --api-key 'My API Key' \\\n --region us-sva-2 \\\n --name n1-standard-8",
967
+ },
968
+ go: {
969
+ method: 'client.InstanceTypes.Get',
970
+ example:
971
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/instance_types"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tinstanceType, err := client.InstanceTypes.Get(\n\t\tcontext.TODO(),\n\t\tinstance_types.InstanceTypeGetParamsRegionUsSva2,\n\t\t"n1-standard-8",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", instanceType.Chipset)\n}\n',
972
+ },
973
+ http: {
974
+ example:
975
+ 'curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
976
+ },
977
+ typescript: {
978
+ method: 'client.instanceTypes.get',
979
+ example:
980
+ "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType.chipset);",
981
+ },
982
+ },
983
+ },
984
+ {
985
+ name: 'list',
986
+ endpoint: '/v1/instance_types',
987
+ httpMethod: 'get',
988
+ summary: 'List Instance Types',
989
+ description: 'List instance types',
990
+ stainlessPath: '(resource) instance_types > (method) list',
991
+ qualified: 'client.instanceTypes.list',
992
+ params: ['cursor?: string;', 'limit?: number;'],
993
+ response:
994
+ "{ chipset: string; created_at: string; memory_gi: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; updated_at: string; vcpu: number; }",
995
+ markdown:
996
+ "## list\n\n`client.instanceTypes.list(cursor?: string, limit?: number): { chipset: string; created_at: string; memory_gi: number; name: string; region: region_name; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types`\n\nList instance types\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ chipset: string; created_at: string; memory_gi: number; name: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `memory_gi: number`\n - `name: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `updated_at: string`\n - `vcpu: number`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType);\n}\n```",
997
+ perLanguage: {
998
+ cli: {
999
+ method: 'instance_types list',
1000
+ example: "nirvana instance-types list \\\n --api-key 'My API Key'",
1001
+ },
1002
+ go: {
1003
+ method: 'client.InstanceTypes.List',
1004
+ example:
1005
+ 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/instance_types"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.InstanceTypes.List(context.TODO(), instance_types.InstanceTypeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
1006
+ },
1007
+ http: {
1008
+ example:
1009
+ 'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
1010
+ },
1011
+ typescript: {
1012
+ method: 'client.instanceTypes.list',
1013
+ example:
1014
+ "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType.chipset);\n}",
1015
+ },
1016
+ },
1017
+ },
949
1018
  {
950
1019
  name: 'create',
951
1020
  endpoint: '/v1/compute/vms',
package/src/methods.ts CHANGED
@@ -166,6 +166,18 @@ export const sdkMethods: SdkMethod[] = [
166
166
  httpMethod: 'get',
167
167
  httpPath: '/v1/regions/{name}',
168
168
  },
169
+ {
170
+ clientCallName: 'client.instanceTypes.list',
171
+ fullyQualifiedName: 'instanceTypes.list',
172
+ httpMethod: 'get',
173
+ httpPath: '/v1/instance_types',
174
+ },
175
+ {
176
+ clientCallName: 'client.instanceTypes.get',
177
+ fullyQualifiedName: 'instanceTypes.get',
178
+ httpMethod: 'get',
179
+ httpPath: '/v1/instance_types/{region}/{name}',
180
+ },
169
181
  {
170
182
  clientCallName: 'client.compute.vms.create',
171
183
  fullyQualifiedName: 'compute.vms.create',
package/src/server.ts CHANGED
@@ -28,7 +28,7 @@ export const newMcpServer = async ({
28
28
  new McpServer(
29
29
  {
30
30
  name: 'nirvana_labs_nirvana_api',
31
- version: '1.65.0',
31
+ version: '1.67.0',
32
32
  },
33
33
  {
34
34
  instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),