You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-schema.json
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -901,6 +901,10 @@
901
901
}
902
902
}
903
903
]
904
+
},
905
+
"working_dir": {
906
+
"type": "string",
907
+
"description": "Optional working directory for the MCP server process. Relative paths are resolved relative to the agent's working directory. Only valid for subprocess-based MCP types (command or ref); not supported for remote MCP toolsets."
904
908
}
905
909
},
906
910
"anyOf": [
@@ -1141,6 +1145,10 @@
1141
1145
"version": {
1142
1146
"type": "string",
1143
1147
"description": "Package reference for auto-installation of MCP/LSP tool binaries. Format: 'owner/repo' or 'owner/repo@version'. Set to 'false' to disable auto-install for this toolset."
1148
+
},
1149
+
"working_dir": {
1150
+
"type": "string",
1151
+
"description": "Optional working directory for MCP/LSP toolset processes. Relative paths are resolved relative to the agent's working directory. Only valid for type 'mcp' or 'lsp', and not supported for remote MCP toolsets (no local subprocess)."
Copy file name to clipboardExpand all lines: docs/configuration/tools/index.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ Browse available tools at the [Docker MCP Catalog](https://hub.docker.com/search
65
65
| `tools` | array | Optional: only expose these tools |
66
66
| `instruction` | string | Custom instructions injected into the agent's context |
67
67
| `config` | any | MCP server-specific configuration (passed during initialization) |
68
+
| `working_dir` | string | Working directory for the MCP gateway subprocess. Only applies when the catalog entry runs as a local process (not remote). Relative paths are resolved against the agent's working directory. |
68
69
69
70
### Local MCP (stdio)
70
71
@@ -86,6 +87,7 @@ toolsets:
86
87
| `args` | array | Command arguments |
87
88
| `tools` | array | Optional: only expose these tools |
| `working_dir` | string | Working directory for the MCP server process. Relative paths are resolved against the agent's working directory. Defaults to the agent's working directory when omitted. |
89
91
| `instruction` | string | Custom instructions injected into the agent's context |
90
92
| `version` | string | Package reference for [auto-installing](#auto-installing-tools) the command binary |
| `working_dir` | string | ✗ | Working directory for the LSP server process. Relative paths are resolved against the agent's working directory. Defaults to the agent's working directory when omitted. |
68
69
| `version` | string | ✗ | Package reference for [auto-installing]({{ '/configuration/tools/#auto-installing-tools' | relative_url }}) the command binary |
69
70
70
71
## Common LSP Servers
@@ -81,6 +82,16 @@ toolsets:
81
82
file_types: [".go"]
82
83
```
83
84
85
+
If your Go module lives in a subdirectory (e.g. a monorepo where `go.mod` is under `./backend`), set `working_dir` so `gopls` is started from the module root:
86
+
87
+
```yaml
88
+
toolsets:
89
+
- type: lsp
90
+
command: gopls
91
+
file_types: [".go"]
92
+
working_dir: ./backend # gopls must be started from the module root
0 commit comments