Skip to content

Commit 8e3985f

Browse files
committed
include responseField for mcp object
adds x-mint.mcp.name and x-mint.mcp.description
1 parent 07742f1 commit 8e3985f

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

ai/model-context-protocol.mdx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ If you have an OpenAPI specification, you can expose specific endpoints as MCP t
3232

3333
MCP servers follow a security-first approach where API endpoints are not exposed by default. You must explicitly enable endpoints to make them available as MCP tools. Only expose endpoints that are safe for public access through AI tools.
3434

35+
<ResponseField name="mcp" type="object">
36+
The MCP configuration for the endpoint.
37+
38+
<Expandable title="MCP">
39+
<ResponseField name="enabled" type="boolean">
40+
Whether to expose the endpoint as an MCP tool. Takes precedence over the file-level configuration.
41+
</ResponseField>
42+
<ResponseField name="name" type="string">
43+
The name of the MCP tool.
44+
</ResponseField>
45+
<ResponseField name="description" type="string">
46+
The description of the MCP tool.
47+
</ResponseField>
48+
</Expandable>
49+
</ResponseField>
50+
3551
### File-level configuration
3652

3753
Enable MCP for all endpoints by default in an OpenAPI specification file and selectively exclude endpoints:
@@ -71,7 +87,9 @@ Enable MCP for specific endpoints:
7187
"get": {
7288
"x-mint": {
7389
"mcp": {
74-
"enabled": true
90+
"enabled": true,
91+
"name": "get-users",
92+
"description": "Get a list of users"
7593
},
7694
// ...
7795
}

api-playground/openapi-setup.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,22 @@ When `x-mint: href` is present, the navigation entry will link directly to the s
191191

192192
Selectively expose endpoints as Model Context Protocol (MCP) tools by using `x-mint: mcp`. Only enable endpoints that are safe for public access through AI tools.
193193

194+
<ResponseField name="mcp" type="object">
195+
The MCP configuration for the endpoint.
196+
197+
<Expandable title="MCP">
198+
<ResponseField name="enabled" type="boolean">
199+
Whether to expose the endpoint as an MCP tool. Takes precedence over the file-level configuration.
200+
</ResponseField>
201+
<ResponseField name="name" type="string">
202+
The name of the MCP tool.
203+
</ResponseField>
204+
<ResponseField name="description" type="string">
205+
The description of the MCP tool.
206+
</ResponseField>
207+
</Expandable>
208+
</ResponseField>
209+
194210
<CodeGroup>
195211
```json Selective enablement {6-10, 21} wrap
196212
{

0 commit comments

Comments
 (0)