feat: add support for custom environment variable expansion#539
Style Review Completed
The pull request has 11 style issues.
Duration: 618ms
PR URL: #539
Review Comments: The AI has posted 11 inline comments with suggestions
Summary of changes:
This pull request refines the documentation by applying several stylistic and grammatical improvements. Instructions are now consistently in the imperative mood, and the active voice is used throughout, with unnecessary introductory clauses and filler words removed for conciseness. Bolding for emphasis has been eliminated, and language has been made more direct and objective. The Oxford comma is now used for lists, and code blocks are properly specified for syntax highlighting. Additionally, idiomatic expressions have been replaced with clearer descriptions of system behavior.
Annotations
Check warning on line 474 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L474
Use the imperative mood for instructions and avoid "You can".
```suggestion
Reference environment variables directly in your configuration file using the `${env.VAR_NAME}` syntax. Use this syntax for existing environment variables that don't follow the `APOLLO_MCP_*` naming convention.
```
Check notice on line 484 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L484
Use active voice and remove unnecessary introductory clauses.
```suggestion
Apollo MCP Server expands these references to their values before parsing the YAML.
```
Check warning on line 488 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L488
Use the imperative mood for instructions and active voice.
```suggestion
Provide a fallback value using the `${env.VAR_NAME:-default}` syntax. If the environment variable is not set, Apollo MCP Server uses the default value:
```
Check warning on line 496 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L496
Use active voice and remove bolding used for emphasis.
```suggestion
Apollo MCP Server uses the default value when the variable is unset or empty. This matches bash and Apollo Router behavior.
```
Check notice on line 500 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L500
Remove filler words like "even" for conciseness.
```suggestion
Default values support special characters, including colons, balanced braces, and `:-`:
```
Check warning on line 515 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L515
Remove bolding used for emphasis, use active voice, and use present tense.
```suggestion
Nested references are not expanded. Apollo MCP Server treats default values as literal text. If your default contains `${env.OTHER}`, it appears literally in the output:
```
Check warning on line 526 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L526
Remove bolding used for emphasis and use present tense.
```suggestion
Quotes don't escape closing braces. Brace matching in default values is purely depth-based. A `}` inside quotes terminates the placeholder:
```
Check warning on line 537 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L537
Remove the filler word "still" and replace the idiomatic "wins" with clearer language describing the system behavior.
```suggestion
`APOLLO_MCP_*` environment variables take precedence over expanded values in the config file. For example, if you set both `${env.MY_ENDPOINT}` in the config and `APOLLO_MCP_ENDPOINT` as an environment variable, the system uses `APOLLO_MCP_ENDPOINT`.
```
Check notice on line 543 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L543
Use the Oxford comma for lists of three or more items.
```suggestion
If your environment variable value contains YAML special characters (colons, brackets, and quotes), wrap the expanded value in quotes:
```
Check notice on line 561 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L561
Remove subjective language and introduce the error message code block more directly.
```suggestion
If a referenced environment variable is not defined, Apollo MCP Server fails to start and returns the following error:
```
Check warning on line 563 in docs/source/config-file.mdx
apollo-librarian / AI Style Review
docs/source/config-file.mdx#L563
Specify the code block's language for syntax highlighting.
```suggestion
```text
```