docs: add managing tools section and tool-router topic (#3310)

Co-authored-by: Rizel Scarlett <rizel@squareup.com>
This commit is contained in:
dianed-square
2025-07-09 07:47:53 -07:00
committed by GitHub
parent c8504b2a41
commit 2f36bac577
9 changed files with 281 additions and 95 deletions

View File

@@ -144,14 +144,14 @@ export GOOSE_PLANNER_CONTEXT_LIMIT=1000000
## Tool Configuration
These variables control how Goose handles [tool permissions](/docs/guides/tool-permissions) and their execution.
These variables control how Goose handles [tool permissions](/docs/guides/managing-tools/tool-permissions) and their execution.
| Variable | Purpose | Values | Default |
|----------|---------|---------|---------|
| `GOOSE_MODE` | Controls how Goose handles tool execution | "auto", "approve", "chat", "smart_approve" | "smart_approve" |
| `GOOSE_TOOLSHIM` | Enables/disables tool call interpretation | "1", "true" (case insensitive) to enable | false |
| `GOOSE_TOOLSHIM_OLLAMA_MODEL` | Specifies the model for [tool call interpretation](/docs/guides/experimental-features/#ollama-tool-shim) | Model name (e.g. llama3.2, qwen2.5) | System default |
| `GOOSE_CLI_MIN_PRIORITY` | Controls verbosity of [tool output](/docs/guides/adjust-tool-output) | Float between 0.0 and 1.0 | 0.0 |
| `GOOSE_CLI_MIN_PRIORITY` | Controls verbosity of [tool output](/docs/guides/managing-tools/adjust-tool-output) | Float between 0.0 and 1.0 | 0.0 |
| `GOOSE_CLI_TOOL_PARAMS_TRUNCATION_MAX_LENGTH` | Maximum length for tool parameter values before truncation in CLI output (not in debug mode) | Integer | 40 |
**Examples**
@@ -196,6 +196,36 @@ export GOOSE_EDITOR_HOST="http://localhost:8000/v1"
export GOOSE_EDITOR_MODEL="your-model"
```
## Tool Selection Strategy
These variables configure the [tool selection strategy](/docs/guides/managing-tools/tool-router).
| Variable | Purpose | Values | Default |
|----------|---------|---------|--------|
| `GOOSE_ROUTER_TOOL_SELECTION_STRATEGY` | The tool selection strategy to use | "default", "vector", "llm" | "default" |
| `GOOSE_EMBEDDING_MODEL_PROVIDER` | The provider to use for generating embeddings for the "vector" strategy | [See available providers](/docs/getting-started/providers#available-providers) (must support embeddings) | "openai" |
| `GOOSE_EMBEDDING_MODEL` | The model to use for generating embeddings for the "vector" strategy | Model name (provider-specific) | "text-embedding-3-small" |
**Examples**
```bash
# Use vector-based tool selection with custom settings
export GOOSE_ROUTER_TOOL_SELECTION_STRATEGY=vector
export GOOSE_EMBEDDING_MODEL_PROVIDER=ollama
export GOOSE_EMBEDDING_MODEL=nomic-embed-text
# Or use LLM-based selection
export GOOSE_ROUTER_TOOL_SELECTION_STRATEGY=llm
```
**Embedding Provider Support**
The default embedding provider is OpenAI. If using a different provider:
- Ensure the provider supports embeddings
- Specify an appropriate embedding model for that provider
- Ensure the provider is properly configured with necessary credentials
## Security Configuration
These variables control security related features.