Skip to content

Commit 15439d9

Browse files
committed
Update documentation to use new env template syntax
Fix remaining references to old {{ env VAR }} syntax in README and example comments. Remove unused pprint/pformat imports.
1 parent 7807de4 commit 15439d9

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ server_params:
314314
url: https://api.githubcopilot.com/mcp/
315315
#See https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md
316316
headers:
317-
Authorization: "{{ env GITHUB_AUTH_HEADER }}"
317+
Authorization: "{{ env('GITHUB_AUTH_HEADER') }}"
318318
optional_headers:
319-
X-MCP-Toolsets: "{{ env GITHUB_MCP_TOOLSETS }}"
320-
X-MCP-Readonly: "{{ env GITHUB_MCP_READONLY }}"
319+
X-MCP-Toolsets: "{{ env('GITHUB_MCP_TOOLSETS') }}"
320+
X-MCP-Readonly: "{{ env('GITHUB_MCP_READONLY') }}"
321321
```
322322

323323
You can force certain tools within a `toolbox` to require user confirmation to run. This can be helpful if a tool may perform irreversible actions and should require user approval prior to its use. This is done by including the name of the tool (function) in the MCP server in the `confirm` section:
@@ -365,7 +365,7 @@ taskflow:
365365
Finally, why are apples and oranges healthy to eat?
366366

367367
# taskflows can set temporary environment variables, these support the general
368-
# "{{ env FROM_EXISTING_ENVIRONMENT }" pattern we use elsewhere as well
368+
# "{{ env('FROM_EXISTING_ENVIRONMENT') }}" pattern we use elsewhere as well
369369
# these environment variables can then be made available to any stdio mcp server
370370
# through its respective yaml configuration, see memcache.yaml for an example
371371
# you can use these to override top-level environment variables on a per-task basis
@@ -512,12 +512,12 @@ Files of types `taskflow` and `toolbox` allow environment variables to be passed
512512
server_params:
513513
...
514514
env:
515-
CODEQL_DBS_BASE_PATH: "{{ env CODEQL_DBS_BASE_PATH }}"
515+
CODEQL_DBS_BASE_PATH: "{{ env('CODEQL_DBS_BASE_PATH') }}"
516516
# prevent git repo operations on gh codeql executions
517517
GH_NO_UPDATE_NOTIFIER: "disable"
518518
```
519519

520-
For `toolbox`, `env` can be used inside `server_params`. A template of the form `{{ env ENV_VARIABLE_NAME }}` can be used to pass values of the environment variable from the current process to the MCP server. So in the above, the MCP server is run with `GH_NO_UPDATE_NOTIFIER=disable` and passes the value of `CODEQL_DBS_BASE_PATH` from the current process to the MCP server. The templated paramater `{{ env CODEQL_DBS_BASE_PATH }}` is replaced by the value of the environment variable `CODEQL_DBS_BASE_PATH` in the current process.
520+
For `toolbox`, `env` can be used inside `server_params`. A template of the form `{{ env('ENV_VARIABLE_NAME') }}` can be used to pass values of the environment variable from the current process to the MCP server. So in the above, the MCP server is run with `GH_NO_UPDATE_NOTIFIER=disable` and passes the value of `CODEQL_DBS_BASE_PATH` from the current process to the MCP server. The templated parameter `{{ env('CODEQL_DBS_BASE_PATH') }}` is replaced by the value of the environment variable `CODEQL_DBS_BASE_PATH` in the current process.
521521

522522
Similarly, environment variables can be passed to a `task` in a `taskflow`:
523523

@@ -534,9 +534,9 @@ taskflow:
534534
MEMCACHE_BACKEND: "dictionary_file"
535535
```
536536
537-
This overwrites the environment variables `MEMCACHE_STATE_DIR` and `MEMCACHE_BACKEND` for the task only. A template `{{ env ENV_VARIABLE_NAME }}` can also be used.
537+
This overwrites the environment variables `MEMCACHE_STATE_DIR` and `MEMCACHE_BACKEND` for the task only. A template `{{ env('ENV_VARIABLE_NAME') }}` can also be used.
538538

539-
Note that when using the template `{{ env ENV_VARIABLE_NAME }}`, `ENV_VARIABLE_NAME` must be the name of an environment variable in the current process.
539+
Note that when using the template `{{ env('ENV_VARIABLE_NAME') }}`, `ENV_VARIABLE_NAME` must be the name of an environment variable in the current process.
540540

541541
## Import paths
542542

examples/taskflows/example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ taskflow:
2929
Finally, why are apples and oranges healthy to eat?
3030
3131
# taskflows can set temporary environment variables, these support the general
32-
# "{{ env FROM_EXISTING_ENVIRONMENT }" pattern we use elsewhere as well
32+
# "{{ env('FROM_EXISTING_ENVIRONMENT') }}" pattern we use elsewhere as well
3333
# these environment variables can then be made available to any stdio mcp server
3434
# through its respective yaml configuration, see memcache.yaml for an example
3535
# you can use these to override top-level environment variables on a per-task basis

src/seclab_taskflow_agent/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from dotenv import load_dotenv, find_dotenv
1010
import logging
1111
from logging.handlers import RotatingFileHandler
12-
from pprint import pprint, pformat
1312
import re
1413
import json
1514
import uuid

0 commit comments

Comments
 (0)