docs: tighten parallel tool-call prose
This commit is contained in:
@@ -11,7 +11,7 @@ Each tool is registered independently; a product that wants only one disables th
|
||||
| `web_search` | `query` (string) | Discovery. Returns an optional answer plus source URLs. `max_results` is **not** model-facing — the tool sets the bound (the `searchMaxResults` config, default 8) and passes it to the seam. |
|
||||
| `web_fetch` | `url` (string) | Retrieves a specific URL. HTML bodies are rendered to markdown-ish text; text bodies pass through. A non-2xx status is reported, not an error. The tool-call timeout is deployment policy (`dsh-timeout-policy`), not a model argument. |
|
||||
|
||||
Both tools declare `isConcurrencySafe: () => true` — they are read-only (fetch a provider/URL, return content, mutate no parent-agent state), so the agent loop may run sibling web calls in parallel.
|
||||
Both tools opt into concurrent scheduling because provider reads return content without mutating parent-agent state.
|
||||
|
||||
## Config
|
||||
|
||||
|
||||
@@ -92,8 +92,7 @@ export function applyWebFetchTool(ctx: Context, timeoutMs: number): void {
|
||||
url: { type: 'string', required: true, description: 'The HTTP(S) URL to fetch.' },
|
||||
},
|
||||
timeoutMs,
|
||||
// Read-only: fetching a URL returns content and mutates no parent-agent
|
||||
// state — safe to run concurrently with sibling calls.
|
||||
// Provider reads do not mutate parent-agent state.
|
||||
isConcurrencySafe: () => true,
|
||||
async execute(args, exec): Promise<ContentBlock[]> {
|
||||
const input = parseFetchArgs(args)
|
||||
|
||||
@@ -109,8 +109,7 @@ export function applyWebSearchTool(ctx: Context, maxResults: number, timeoutMs:
|
||||
query: { type: 'string', required: true, description: 'The search query.' },
|
||||
},
|
||||
timeoutMs,
|
||||
// Read-only: a search hits the provider and returns content, mutating no
|
||||
// parent-agent state — safe to run concurrently with sibling calls.
|
||||
// Provider reads do not mutate parent-agent state.
|
||||
isConcurrencySafe: () => true,
|
||||
async execute(args, exec): Promise<ContentBlock[]> {
|
||||
const input = parseSearchArgs(args)
|
||||
|
||||
Reference in New Issue
Block a user