Skip to content

Commit 1c07f4a

Browse files
feat: add openapi target
1 parent ec7f479 commit 1c07f4a

File tree

11 files changed

+22
-9
lines changed

11 files changed

+22
-9
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-babb926f3cc81e4b1d5f10f5cb0f36fc2fd5da122c32a9c2d373d83cb8977848.yml
3-
openapi_spec_hash: e8cb8b819592f7703532f3a7ef1585ef
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-6783cf45e0ea6644994eae08c41f755e29948bee313a6c2aaf5b710253eb4eaa.yml
3+
openapi_spec_hash: b37f9ad1ca6bce774c6448b28d267bec
44
config_hash: f1b8a43873719fc8f2789008f3aa2260

packages/mcp-server/src/tools/builds/create-builds.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ export const tool: Tool = {
7575
node: {
7676
type: 'string',
7777
},
78+
openapi: {
79+
type: 'string',
80+
},
7881
php: {
7982
type: 'string',
8083
},
@@ -117,6 +120,7 @@ export const tool: Tool = {
117120
'cli',
118121
'php',
119122
'csharp',
123+
'openapi',
120124
],
121125
},
122126
},

packages/mcp-server/src/tools/builds/target-outputs/retrieve-builds-target-outputs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
1717
export const tool: Tool = {
1818
name: 'retrieve_builds_target_outputs',
1919
description:
20-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a method to download an output for a given build target.\n\nIf the requested type of output is `source`, and the requested output\nmethod is `url`, a download link to a tarball of the source files is\nreturned. If the requested output method is `git`, a Git remote, ref,\nand access token (if necessary) is returned.\n\nOtherwise, the possible types of outputs are specific to the requested\ntarget, and the output method _must_ be `url`. See the documentation for\n`type` for more information.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/target_output_retrieve_response',\n $defs: {\n target_output_retrieve_response: {\n anyOf: [ {\n type: 'object',\n properties: {\n output: {\n type: 'string',\n enum: [ 'url'\n ]\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL for direct download'\n }\n },\n required: [ 'output',\n 'target',\n 'type',\n 'url'\n ]\n },\n {\n type: 'object',\n properties: {\n token: {\n type: 'string',\n description: 'Temporary GitHub access token'\n },\n output: {\n type: 'string',\n enum: [ 'git'\n ]\n },\n ref: {\n type: 'string',\n description: 'Git reference (commit SHA, branch, or tag)'\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL to git remote'\n }\n },\n required: [ 'token',\n 'output',\n 'ref',\n 'target',\n 'type',\n 'url'\n ]\n }\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
20+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a method to download an output for a given build target.\n\nIf the requested type of output is `source`, and the requested output\nmethod is `url`, a download link to a tarball of the source files is\nreturned. If the requested output method is `git`, a Git remote, ref,\nand access token (if necessary) is returned.\n\nOtherwise, the possible types of outputs are specific to the requested\ntarget, and the output method _must_ be `url`. See the documentation for\n`type` for more information.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/target_output_retrieve_response',\n $defs: {\n target_output_retrieve_response: {\n anyOf: [ {\n type: 'object',\n properties: {\n output: {\n type: 'string',\n enum: [ 'url'\n ]\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL for direct download'\n }\n },\n required: [ 'output',\n 'target',\n 'type',\n 'url'\n ]\n },\n {\n type: 'object',\n properties: {\n token: {\n type: 'string',\n description: 'Temporary GitHub access token'\n },\n output: {\n type: 'string',\n enum: [ 'git'\n ]\n },\n ref: {\n type: 'string',\n description: 'Git reference (commit SHA, branch, or tag)'\n },\n target: {\n $ref: '#/$defs/target'\n },\n type: {\n type: 'string',\n enum: [ 'source',\n 'dist',\n 'wheel'\n ]\n },\n url: {\n type: 'string',\n description: 'URL to git remote'\n }\n },\n required: [ 'token',\n 'output',\n 'ref',\n 'target',\n 'type',\n 'url'\n ]\n }\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp',\n 'openapi'\n ]\n }\n }\n}\n```",
2121
inputSchema: {
2222
type: 'object',
2323
properties: {
@@ -40,6 +40,7 @@ export const tool: Tool = {
4040
'cli',
4141
'php',
4242
'csharp',
43+
'openapi',
4344
],
4445
},
4546
type: {

packages/mcp-server/src/tools/projects/create-projects.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
1717
export const tool: Tool = {
1818
name: 'create_projects',
1919
description:
20-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new project.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
20+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new project.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp',\n 'openapi'\n ]\n }\n }\n}\n```",
2121
inputSchema: {
2222
type: 'object',
2323
properties: {
@@ -68,6 +68,7 @@ export const tool: Tool = {
6868
'cli',
6969
'php',
7070
'csharp',
71+
'openapi',
7172
],
7273
},
7374
},

packages/mcp-server/src/tools/projects/list-projects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
1717
export const tool: Tool = {
1818
name: 'list_projects',
1919
description:
20-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList projects in an organization, from oldest to newest.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/project'\n }\n },\n has_more: {\n type: 'boolean'\n },\n next_cursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'has_more'\n ],\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
20+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList projects in an organization, from oldest to newest.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/project'\n }\n },\n has_more: {\n type: 'boolean'\n },\n next_cursor: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'has_more'\n ],\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp',\n 'openapi'\n ]\n }\n }\n}\n```",
2121
inputSchema: {
2222
type: 'object',
2323
properties: {

packages/mcp-server/src/tools/projects/retrieve-projects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
1717
export const tool: Tool = {
1818
name: 'retrieve_projects',
1919
description:
20-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a project by name.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
20+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve a project by name.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp',\n 'openapi'\n ]\n }\n }\n}\n```",
2121
inputSchema: {
2222
type: 'object',
2323
properties: {

packages/mcp-server/src/tools/projects/update-projects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
1717
export const tool: Tool = {
1818
name: 'update_projects',
1919
description:
20-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate a project's properties.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp'\n ]\n }\n }\n}\n```",
20+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nUpdate a project's properties.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/project',\n $defs: {\n project: {\n type: 'object',\n description: 'A project is a collection of SDKs generated from the same set of config files.',\n properties: {\n config_repo: {\n type: 'string'\n },\n display_name: {\n type: 'string'\n },\n object: {\n type: 'string',\n enum: [ 'project'\n ]\n },\n org: {\n type: 'string'\n },\n slug: {\n type: 'string'\n },\n targets: {\n type: 'array',\n items: {\n $ref: '#/$defs/target'\n }\n }\n },\n required: [ 'config_repo',\n 'display_name',\n 'object',\n 'org',\n 'slug',\n 'targets'\n ]\n },\n target: {\n type: 'string',\n enum: [ 'node',\n 'typescript',\n 'python',\n 'go',\n 'java',\n 'kotlin',\n 'ruby',\n 'terraform',\n 'cli',\n 'php',\n 'csharp',\n 'openapi'\n ]\n }\n }\n}\n```",
2121
inputSchema: {
2222
type: 'object',
2323
properties: {

src/resources/builds/builds.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ export namespace Build {
124124

125125
node?: BuildsAPI.BuildTarget;
126126

127+
openapi?: BuildsAPI.BuildTarget;
128+
127129
php?: BuildsAPI.BuildTarget;
128130

129131
python?: BuildsAPI.BuildTarget;
@@ -340,6 +342,8 @@ export namespace BuildCreateParams {
340342

341343
node?: string;
342344

345+
openapi?: string;
346+
343347
php?: string;
344348

345349
python?: string;

src/resources/builds/target-outputs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export interface TargetOutputRetrieveParams {
8888
| 'terraform'
8989
| 'cli'
9090
| 'php'
91-
| 'csharp';
91+
| 'csharp'
92+
| 'openapi';
9293

9394
type: 'source' | 'dist' | 'wheel';
9495

src/resources/shared.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,5 @@ export type Target =
5959
| 'terraform'
6060
| 'cli'
6161
| 'php'
62-
| 'csharp';
62+
| 'csharp'
63+
| 'openapi';

0 commit comments

Comments
 (0)