Skip to content

Commit 1a33d8a

Browse files
committed
docs: add docs for minify options in introspect and search tools [GT-332]
1 parent 1130918 commit 1a33d8a

File tree

2 files changed

+54
-10
lines changed

2 files changed

+54
-10
lines changed

docs/source/command-reference.mdx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,20 @@ Health checks are only available when using the `streamable_http` transport. The
177177

178178
These fields are under the top-level `introspection` key. Learn more about the MCP [introspection tools](/apollo-mcp-server/guides#introspection-tools).
179179

180-
| Option | Type | Default | Description |
181-
| :------------------- | :------- | :------ | :-------------------------------------------------------------------- |
182-
| `execute` | `object` | | Execution configuration for introspection |
183-
| `execute.enabled` | `bool` | `false` | Enable introspection for execution |
184-
| `introspect` | `object` | | Introspection configuration for allowing clients to run introspection |
185-
| `introspect.enabled` | `bool` | `false` | Enable introspection requests |
186-
| `search` | `object` | | Search tool configuration |
187-
| `search.enabled` | `bool` | `false` | Enable search tool |
188-
| `validate` | `object` | | Validation tool configuration |
189-
| `validate.enabled` | `bool` | `false` | Enable validation tool |
180+
| Option | Type | Default | Description |
181+
| :-------------------------- | :------- | :--------- | :-------------------------------------------------------------------- |
182+
| `execute` | `object` | | Execution configuration for introspection |
183+
| `execute.enabled` | `bool` | `false` | Enable introspection for execution |
184+
| `introspect` | `object` | | Introspection configuration for allowing clients to run introspection |
185+
| `introspect.enabled` | `bool` | `false` | Enable introspection requests |
186+
| `introspect.minify` | `bool` | `false` | Minify introspection results to reduce context window usage |
187+
| `search` | `object` | | Search tool configuration |
188+
| `search.enabled` | `bool` | `false` | Enable search tool |
189+
| `search.index_memory_bytes` | `number` | `50000000` | Amount of memory used for indexing (in bytes) |
190+
| `search.leaf_depth` | `number` | `1` | Depth of subtype information to include from matching types |
191+
| `search.minify` | `bool` | `false` | Minify search results to reduce context window usage |
192+
| `validate` | `object` | | Validation tool configuration |
193+
| `validate.enabled` | `bool` | `false` | Enable validation tool |
190194

191195
#### Logging configuration
192196

docs/source/guides/index.mdx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,40 @@ You can enable the following introspection tools:
166166

167167
The MCP client can use these tools to provide schema information to the model and its context window, and allow the model to execute GraphQL operations based on that schema.
168168

169+
### Minification
170+
171+
Both the `introspect` and `search` tools support minification of their results through the `minify` option. These options help optimize context window usage for AI models.
172+
173+
- **Reduces context window usage**: Minified GraphQL SDL takes up significantly less space in the AI model's context window, allowing for more complex schemas or additional context
174+
- **Uses compact notation**: Type definitions use prefixed compact syntax and common scalar types are shortened
175+
- **Preserves functionality**: All essential type information is retained, just in a more compact format
176+
- **Includes legend in tool descriptions**: When minify is enabled, the tool descriptions automatically include a legend explaining the notation
177+
178+
**Minification format:**
179+
180+
- **Type prefixes**: `T=type`, `I=input`, `E=enum`, `U=union`, `F=interface`
181+
- **Scalar abbreviations**: `s=String`, `i=Int`, `f=Float`, `b=Boolean`, `d=ID`
182+
- **Type modifiers**: `!=required`, `[]=list`, `<>=implements`
183+
184+
Example comparison:
185+
186+
**Regular output:**
187+
188+
```graphql
189+
type User {
190+
id: ID!
191+
name: String
192+
email: String!
193+
posts: [Post]
194+
}
195+
```
196+
197+
**Minified output:**
198+
199+
```
200+
T:User:id:d!,name:s,email:s!,posts:[Post]
201+
```
202+
169203
<Tip>
170204
171205
Use a [contract variant](/graphos/platform/schema-management/delivery/contracts/overview) so you can control the parts of your graph that AI can introspect. [Learn more](/apollo-mcp-server/best-practices#use-contract-variants-to-control-ai-access-to-graphs)
@@ -178,6 +212,12 @@ introspection:
178212
enabled: true
179213
introspect:
180214
enabled: true
215+
minify: true
216+
search:
217+
enabled: true
218+
minify: true
219+
index_memory_bytes: 50000000
220+
leaf_depth: 1
181221
validate:
182222
enabled: true
183223
```

0 commit comments

Comments
 (0)