zuplo 7.15.14 → 7.15.17
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.
|
@@ -298,6 +298,16 @@ operation.
|
|
|
298
298
|
}
|
|
299
299
|
```
|
|
300
300
|
|
|
301
|
+
:::note
|
|
302
|
+
|
|
303
|
+
From compatibility date `2026-11-06`, a GraphQL route in `x-zuplo-route.mcp`
|
|
304
|
+
gets schema, query, and mutation tools instead, and `introspectionTool` and
|
|
305
|
+
`executeTool` fail the build. On that date, leave them out and configure the
|
|
306
|
+
tools with `schemaTool`, `queryTool`, and `mutationTool`. See
|
|
307
|
+
[Schema, query, and mutation tools](./graphql.mdx#schema-query-and-mutation-tools).
|
|
308
|
+
|
|
309
|
+
:::
|
|
310
|
+
|
|
301
311
|
## New Features
|
|
302
312
|
|
|
303
313
|
### Enabled Flag
|
|
@@ -337,7 +347,9 @@ providing better IDE support and error messages.
|
|
|
337
347
|
`type: "resource"`
|
|
338
348
|
- [ ] Move `x-zuplo-mcp-graphql` into `x-zuplo-route.mcp` with `type: "graphql"`
|
|
339
349
|
- [ ] Update GraphQL field names: `introspectionToolName` →
|
|
340
|
-
`introspectionTool.name`, `executeToolName` → `executeTool.name
|
|
350
|
+
`introspectionTool.name`, `executeToolName` → `executeTool.name`, or on
|
|
351
|
+
compatibility date `2026-11-06` and later, configure `schemaTool`,
|
|
352
|
+
`queryTool`, and `mutationTool` instead
|
|
341
353
|
- [ ] Test your MCP server to ensure all operations are registered correctly
|
|
342
354
|
|
|
343
355
|
## Backward Compatibility
|
|
@@ -7,18 +7,22 @@ applies_to:
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
The MCP Server Handler supports GraphQL endpoints through the `x-zuplo-route`
|
|
10
|
-
OpenAPI extension.
|
|
11
|
-
|
|
10
|
+
OpenAPI extension. A GraphQL route becomes a set of MCP tools that let AI
|
|
11
|
+
systems read your schema and run operations, without a tool definition for each
|
|
12
|
+
query.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
Your project's [compatibility date](../programmable-api/compatibility-dates.mdx)
|
|
15
|
+
picks the tools a GraphQL route registers:
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
| Compatibility date | Tools |
|
|
18
|
+
| ---------------------- | ---------------------------------------------------------------------------- |
|
|
19
|
+
| `2026-11-06` and later | Schema tool (SDL), query tool (queries only), mutation tool (mutations only) |
|
|
20
|
+
| Before `2026-11-06` | Introspection tool, execute tool (any operation) |
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
The schema, query, and mutation tools keep reads and writes in separate tools,
|
|
23
|
+
so MCP clients and MCP directories can tell them apart, and you can turn writes
|
|
24
|
+
off. To use them, set `"compatibilityDate": "2026-11-06"` or later in
|
|
25
|
+
`zuplo.jsonc`.
|
|
22
26
|
|
|
23
27
|
## Quick Start
|
|
24
28
|
|
|
@@ -92,24 +96,173 @@ Include the GraphQL route in your MCP Server configuration using the
|
|
|
92
96
|
}
|
|
93
97
|
```
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
On compatibility date `2026-11-06` or later, this configuration creates:
|
|
96
100
|
|
|
97
|
-
- `
|
|
98
|
-
- `
|
|
101
|
+
- `graphql_schema` - Returns types of the GraphQL schema as SDL
|
|
102
|
+
- `graphql_query` - Runs GraphQL queries
|
|
103
|
+
- `graphql_mutation` - Runs GraphQL mutations
|
|
104
|
+
|
|
105
|
+
On an earlier date, it creates:
|
|
106
|
+
|
|
107
|
+
- `graphql_introspect` - Fetches the GraphQL schema
|
|
108
|
+
- `graphql_execute_query` - Runs any GraphQL operation
|
|
99
109
|
|
|
100
110
|
## Configuration Options
|
|
101
111
|
|
|
102
|
-
|
|
103
|
-
|
|
112
|
+
These options apply on every compatibility date:
|
|
113
|
+
|
|
114
|
+
- `type`: Must be set to `"graphql"`.
|
|
115
|
+
- `enabled`: Set to `false` to register no tools for the route (default:
|
|
116
|
+
`true`). Before compatibility date `2026-11-06`, the route ignores
|
|
117
|
+
`enabled: false`.
|
|
118
|
+
|
|
119
|
+
Each set of tools has its own options, described below. A route that sets an
|
|
120
|
+
option of the other set fails the build: for example, `executeTool` on
|
|
121
|
+
compatibility date `2026-11-06` or later, or `queryTool` on an earlier date. An
|
|
122
|
+
`introspectionTool` or `executeTool` with only empty values doesn't count.
|
|
123
|
+
|
|
124
|
+
## Schema, Query, and Mutation Tools
|
|
125
|
+
|
|
126
|
+
From compatibility date `2026-11-06`, a GraphQL route registers these tools, in
|
|
127
|
+
this order:
|
|
128
|
+
|
|
129
|
+
| Tool | What it does | Annotations |
|
|
130
|
+
| ------------------------ | ---------------------------------- | --------------------------- |
|
|
131
|
+
| `{operationId}_schema` | Returns types of the schema as SDL | Read-only, idempotent |
|
|
132
|
+
| `{operationId}_query` | Runs query operations only | Read-only, idempotent |
|
|
133
|
+
| `{operationId}_mutation` | Runs mutation operations only | Destructive, not idempotent |
|
|
134
|
+
|
|
135
|
+
Every tool sends a title and `openWorldHint: false`. The default titles are
|
|
136
|
+
`{summary} schema`, `{summary} query`, and `{summary} mutation`, where
|
|
137
|
+
`{summary}` is the operation's `summary`, or its `operationId` when it has none.
|
|
138
|
+
|
|
139
|
+
### Schema, Query, and Mutation Tool Options
|
|
140
|
+
|
|
141
|
+
- `documentationUrl`: A link to your GraphQL API reference. The default query
|
|
142
|
+
and mutation descriptions end with it.
|
|
143
|
+
- `schemaTool`, `queryTool`, `mutationTool`: Configuration for each tool.
|
|
144
|
+
- `enabled`: Set to `false` to leave the tool out.
|
|
145
|
+
- `name`: Custom name for the tool.
|
|
146
|
+
- `title`: Custom title for the tool.
|
|
147
|
+
- `description`: Custom description, used as written.
|
|
148
|
+
- `annotations`: MCP tool annotations, merged over the defaults in the table
|
|
149
|
+
above.
|
|
150
|
+
- `schemaTool.defaultTypeNames`: The types the schema tool returns when a call
|
|
151
|
+
doesn't pass `typeNames`, for example `["Query"]`. See
|
|
152
|
+
[Schema tool](#schema-tool).
|
|
153
|
+
- `schemaTool.defaultDepth`: The `depth` used when a call doesn't pass `depth`:
|
|
154
|
+
`0`, `1`, or `2` (default: `0`).
|
|
155
|
+
|
|
156
|
+
For example, a read-only server with custom tool names:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
"mcp": {
|
|
160
|
+
"type": "graphql",
|
|
161
|
+
"documentationUrl": "https://docs.example.com/graphql",
|
|
162
|
+
"schemaTool": { "name": "example_schema" },
|
|
163
|
+
"queryTool": { "name": "example_query" },
|
|
164
|
+
"mutationTool": { "enabled": false }
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
If your mutations only ever add data, mark them as not destructive:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
"mutationTool": { "annotations": { "destructiveHint": false } }
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Schema Tool
|
|
175
|
+
|
|
176
|
+
The schema tool returns types of the schema as SDL text, so an agent reads only
|
|
177
|
+
the part of a large schema it needs. Called without arguments, it returns the
|
|
178
|
+
root query type, the root mutation type, and a last line that names every other
|
|
179
|
+
type:
|
|
180
|
+
|
|
181
|
+
```graphql
|
|
182
|
+
type Query {
|
|
183
|
+
order(id: ID!): Order
|
|
184
|
+
customer(id: ID!): Customer
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type Mutation {
|
|
188
|
+
deleteOrder(id: ID!): Boolean
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
# Other types: Address, Customer, Order
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The agent then asks for the types it needs by name. The tool takes two optional
|
|
195
|
+
arguments:
|
|
196
|
+
|
|
197
|
+
- `typeNames`: The types to return, for example `["Order"]`.
|
|
198
|
+
- `depth`: How many levels of referenced types to include, from `0` to `2`.
|
|
199
|
+
Referenced types are the types of fields, arguments, input fields, interfaces,
|
|
200
|
+
and union members.
|
|
201
|
+
|
|
202
|
+
The schema tool never returns or names the root subscription type, because no
|
|
203
|
+
tool runs subscriptions. When you turn the mutation tool off, it leaves out the
|
|
204
|
+
root mutation type too.
|
|
205
|
+
|
|
206
|
+
To return other types from a call without `typeNames`, set
|
|
207
|
+
`schemaTool.defaultTypeNames`. For example, to return only the root query
|
|
208
|
+
fields:
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
"schemaTool": { "defaultTypeNames": ["Query"] }
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
An unknown type name returns a tool error that suggests close names:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
Unknown type "Ordr". Did you mean: Order, OrderLine, OrderInput, OrderStatus?
|
|
218
|
+
Type names are case-sensitive. Call graphql_schema without typeNames to list every type.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The schema tool sends a standard introspection query to the route, so the route
|
|
222
|
+
must allow GraphQL introspection.
|
|
223
|
+
|
|
224
|
+
### Query and Mutation Tools
|
|
225
|
+
|
|
226
|
+
Both tools take `query` (required), `variables`, and `operationName`, and send
|
|
227
|
+
them to the route as a JSON body. The route's policies run as usual. A call with
|
|
228
|
+
any other argument is rejected.
|
|
229
|
+
|
|
230
|
+
Each tool parses the document before it sends anything to the route, and rejects
|
|
231
|
+
the call when:
|
|
232
|
+
|
|
233
|
+
- the operation is the other tool's type, for example a mutation sent to the
|
|
234
|
+
query tool;
|
|
235
|
+
- the operation is a subscription;
|
|
236
|
+
- the document has a syntax error or no operation;
|
|
237
|
+
- the document has several operations and `operationName` doesn't pick one;
|
|
238
|
+
- several operations share the name in `operationName`.
|
|
239
|
+
|
|
240
|
+
The error tells the agent what to change:
|
|
241
|
+
|
|
242
|
+
```text
|
|
243
|
+
Invalid arguments for tool 'graphql_query': Operation is a mutation. Use the graphql_mutation tool.
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
A result is a tool error (`isError: true`) when the route answers with a status
|
|
247
|
+
outside `200`-`299`, or when the response has a non-empty `errors` array, even
|
|
248
|
+
with partial `data`.
|
|
249
|
+
|
|
250
|
+
## Introspection and Execute Tools
|
|
251
|
+
|
|
252
|
+
Before compatibility date `2026-11-06`, a GraphQL route registers an
|
|
253
|
+
introspection tool, `{operationId}_introspect`, and an execute tool,
|
|
254
|
+
`{operationId}_execute_query`, which runs any operation the route accepts.
|
|
255
|
+
|
|
256
|
+
### Introspection and Execute Tool Options
|
|
104
257
|
|
|
105
|
-
- `type`: Must be set to `"graphql"`
|
|
106
|
-
- `enabled`: Whether the GraphQL MCP capabilities are enabled (default: `true`).
|
|
107
258
|
- `introspectionTool`: Configuration for the introspection tool.
|
|
108
259
|
- `name`: Custom name for the introspection tool.
|
|
109
260
|
- `description`: Custom description for the introspection tool.
|
|
261
|
+
- `annotations`: MCP tool annotations, sent as configured.
|
|
110
262
|
- `executeTool`: Configuration for the execute tool.
|
|
111
263
|
- `name`: Custom name for the execute tool.
|
|
112
264
|
- `description`: Custom description for the execute tool.
|
|
265
|
+
- `annotations`: MCP tool annotations, sent as configured.
|
|
113
266
|
|
|
114
267
|
For example:
|
|
115
268
|
|
|
@@ -161,8 +161,8 @@ selection qualifies when its Provider Assignment is backed by that provider
|
|
|
161
161
|
type, or when the provider catalog declares the selected model's dialect as that
|
|
162
162
|
format — Bedrock Mantle serves its `openai`-dialect models on `/v1/responses`
|
|
163
163
|
and its `anthropic`-dialect models on `/v1/messages`, and Vertex AI serves its
|
|
164
|
-
`anthropic`-dialect Claude models on `/v1/messages`. Provider Names
|
|
165
|
-
|
|
164
|
+
`anthropic`-dialect Claude models on `/v1/messages`. Provider Names are chosen
|
|
165
|
+
freely; validation never infers anything from the Provider Name or the model
|
|
166
166
|
name, and a model the catalog does not declare is rejected.
|
|
167
167
|
|
|
168
168
|
For example, this embedding request is evaluated against `models.embeddings`:
|
|
@@ -280,7 +280,7 @@ models, unavailable adapters, and assignments without locally resolvable
|
|
|
280
280
|
credentials are excluded. List and retrieve use identical eligibility rules;
|
|
281
281
|
unknown, filtered-out, and wrong-endpoint IDs return the same 404.
|
|
282
282
|
|
|
283
|
-
IDs retain the exact model-name casing; only the provider assignment
|
|
283
|
+
IDs retain the exact model-name casing; only the provider assignment's name is
|
|
284
284
|
normalized. OpenAI entries contain `id`, `object`, `created`, and `owned_by`.
|
|
285
285
|
`owned_by` means the provider assignment namespace, not the model's developer.
|
|
286
286
|
Anthropic entries contain `id`, `type`, `display_name`, and `created_at`, with
|
|
@@ -274,6 +274,29 @@ prompt and the first invalid message when a message's `role` isn't `user` or
|
|
|
274
274
|
The answer to a batch is always an array. A blank tool name falls back to the
|
|
275
275
|
operation's `operationId`.
|
|
276
276
|
|
|
277
|
+
### GraphQL Routes Get Separate Read and Write Tools
|
|
278
|
+
|
|
279
|
+
This compatibility date changes the tools that the
|
|
280
|
+
[MCP Server handler](../handlers/mcp-server.mdx) registers for a
|
|
281
|
+
[GraphQL route](../mcp-server/graphql.mdx).
|
|
282
|
+
|
|
283
|
+
**Before this date:** The route registers `{operationId}_introspect`, which
|
|
284
|
+
returns the schema as introspection JSON, and `{operationId}_execute_query`,
|
|
285
|
+
which runs any operation, mutations included. A response with GraphQL `errors`
|
|
286
|
+
and a `200` status isn't a tool error. `"enabled": false` on the route is
|
|
287
|
+
ignored.
|
|
288
|
+
|
|
289
|
+
**After this date:** The route registers `{operationId}_schema`, which returns
|
|
290
|
+
types of the schema as SDL, `{operationId}_query`, which runs only queries, and
|
|
291
|
+
`{operationId}_mutation`, which runs only mutations. Called without arguments,
|
|
292
|
+
the schema tool returns the root query and mutation types and the names of the
|
|
293
|
+
other types. The query and mutation tools reject the wrong operation type before
|
|
294
|
+
anything is sent to the route, and a response with GraphQL `errors` is a tool
|
|
295
|
+
error. `"enabled": false` on a GraphQL route registers no tools. Configure the
|
|
296
|
+
tools with `schemaTool`, `queryTool`, and `mutationTool`: `introspectionTool`
|
|
297
|
+
and `executeTool` fail the build. See
|
|
298
|
+
[Schema, query, and mutation tools](../mcp-server/graphql.mdx#schema-query-and-mutation-tools).
|
|
299
|
+
|
|
277
300
|
## 2026-03-01
|
|
278
301
|
|
|
279
302
|
:::note
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zuplo",
|
|
3
|
-
"version": "7.15.
|
|
3
|
+
"version": "7.15.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The official Zuplo CLI for local development and platform management",
|
|
6
6
|
"homepage": "https://zuplo.com/docs/cli/overview",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"zuplo": "zuplo.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@zuplo/cli": "7.15.
|
|
36
|
-
"@zuplo/core": "7.15.
|
|
37
|
-
"@zuplo/runtime": "7.15.
|
|
38
|
-
"@zuplo/test": "7.15.
|
|
35
|
+
"@zuplo/cli": "7.15.17",
|
|
36
|
+
"@zuplo/core": "7.15.17",
|
|
37
|
+
"@zuplo/runtime": "7.15.17",
|
|
38
|
+
"@zuplo/test": "7.15.17"
|
|
39
39
|
}
|
|
40
40
|
}
|