Skip to content

Commit 173d84f

Browse files
committed
edits for docs style consistency
1 parent f386e21 commit 173d84f

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

docs/source/define-tools.mdx

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ operations:
8686

8787
For graphs managed by GraphOS, Apollo MCP Server can get operations by reading persisted queries from GraphOS. The MCP Server uses Apollo Uplink to access the persisted queries.
8888

89-
To use GraphOS persisted queries, you must:
89+
To use GraphOS persisted queries, you must set your graph credentials `APOLLO_GRAPH_REF` and `APOLLO_KEY` as environment variables.
9090

91-
- Set `APOLLO_GRAPH_REF` and `APOLLO_KEY` environment variables for a GraphOS graph
91+
Use the `operations.source: uplink` option to specify that tools should be loaded from GraphOS-managed persisted queries.
9292

9393
<Tip>
9494

@@ -97,17 +97,8 @@ Use a [contract variant](/graphos/platform/schema-management/delivery/contracts/
9797
</Tip>
9898

9999
```yaml title="Example config using GraphOS-managed persisted queries"
100-
headers:
101-
"apollographql-client-name": "my-web-app"
102100
operations:
103101
source: uplink
104-
schema:
105-
source: local
106-
path: <absolute path to this git repo>/graphql/weather/api.graphql
107-
```
108-
109-
```sh title="Example command using GraphOS-managed persisted queries"
110-
apollo-mcp-server <path to the preceding config>
111102
```
112103

113104
The MCP Server supports hot reloading of GraphOS-managed persisted queries, so it can automatically pick up changes from GraphOS without restarting.
@@ -116,16 +107,23 @@ If you register a persisted query with a specific client name instead of `null`,
116107

117108
Use the `headers` option when running the MCP Server to pass the header to the router. The default name of the header expected by the router is `apollographql-client-name`. To use a different header name, configure `telemetry.apollo.client_name_header` in router YAML configuration.
118109

110+
```yaml title="Example config using GraphOS-managed persisted queries" {1-2}
111+
headers:
112+
"apollographql-client-name": "my-web-app"
113+
operations:
114+
source: uplink
115+
```
116+
119117
## Introspection tools
120118

121119
In addition to defining specific tools for pre-defined GraphQL operations, Apollo MCP Server supports introspection tools that enable AI agents to explore the graph schema and execute operations dynamically.
122120

123121
You can enable the following introspection tools:
124122

125-
- `introspect` - allows the AI model to introspect the schema of the GraphQL API by providing a specific type name to get information about, and a depth parameter to determine how deep to traverse the subtype hierarchy. The AI model can start the introspection by looking up the top-level `Query` or `Mutation` type.
126-
- `search` - allows the AI model to search for type information by providing a set of search terms. This can result in fewer tool calls than `introspect`, especially if the desired type is deep in the type hierarchy of the schema. Search results include all the parent type information needed to construct operations involving the matching type.
127-
- `validate` - validates a GraphQL operation against the schema without executing it. This allows AI models to verify that their operations are syntactically correct and conform to the schema before execution, preventing unintended side effects. Operations should be validated prior to calling the `execute` tool.
128-
- `execute` - executes an operation on the GraphQL endpoint
123+
- `introspect`: allows the AI model to introspect the schema of the GraphQL API by providing a specific type name to get information about, and a depth parameter to determine how deep to traverse the subtype hierarchy. The AI model can start the introspection by looking up the top-level `Query` or `Mutation` type.
124+
- `search`: allows the AI model to search for type information by providing a set of search terms. This can result in fewer tool calls than `introspect`, especially if the desired type is deep in the type hierarchy of the schema. Search results include all the parent type information needed to construct operations involving the matching type.
125+
- `validate`: validates a GraphQL operation against the schema without executing it. This allows AI models to verify that their operations are syntactically correct and conform to the schema before execution, preventing unintended side effects. Operations should be validated prior to calling the `execute` tool.
126+
- `execute`: executes an operation on the GraphQL endpoint
129127

130128
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.
131129

@@ -183,8 +181,4 @@ introspection:
183181
leaf_depth: 1
184182
validate:
185183
enabled: true
186-
```
187-
188-
```sh title="Example command using introspection"
189-
apollo-mcp-server <path to the preceding config>
190184
```

0 commit comments

Comments
 (0)