Skip to main content
Glama

websearch

Read-only

Run a web search via the Codex web search tool in a read-only session returning a background job. Retrieve results with waitCommand, waitCommandPosix, or job_status using the jobId.

Instructions

Start a search using the native Codex web search tool in a read-only session. Returns a background job immediately. Run waitCommand or waitCommandPosix (Bash or Zsh), or call job_status with jobId for output.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "websearch"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel slug or alias. When a speed tier is active, defaults to CODEX_DEFAULT_MODEL or sol. Otherwise uses the Codex CLI model if omitted.
queryYesSearch query string
speedNoAlias for serviceTier.
numResultsNoNumber of results to return (default: 10)
searchDepthNoSearch depth: basic or full
serviceTierNoSpeed tier: fast (priority), ultrafast, or default/standard to disable the override. Case-insensitive. Falls back to CODEX_DEFAULT_SERVICE_TIER. Check listModels for supported tiers.
service_tierNoAlias for serviceTier.
reasoningEffortNoReasoning effort depth: none, minimal, low, medium, high, xhigh, max, ultra (also accepts snake_case reasoning_effort).
reasoning_effortNoAlias for reasoningEffort.
workingDirectoryNoWorking directory for Codex CLI.

Output Schema

NameRequiredDescriptionDefault
toolYes
jobIdYes
modelYes
statusYes
logFileYes
runnerPidYes
sessionIdYes
stderrFileYes
stdoutFileYes
serviceTierYes
waitCommandYes
waitCommandPosixYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, idempotentHint=false and destructiveHint=false, so safety is covered. The description adds genuinely non-structured behavior: it returns a background job immediately and results must be collected via waitCommand/waitCommandPosix or job_status. It stops short of covering failure modes, job lifetime, or cost, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and then the retrieval path; no filler. The parenthetical "(Bash or Zsh)" is slightly dense but conveys real information about which wait variant to pick.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return-value detail is not required, and the async job + polling instruction covers the most important operational gap. For a ten-parameter tool, a note on cancellation (cancel_job) or what happens to the job on timeout would round it out.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each of the ten parameters including model fallback logic, serviceTier tiers, and reasoningEffort values documented in the schema itself. The description contributes nothing about parameters, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Start a search using the native Codex web search tool in a read-only session" gives a specific verb (start a search) and resource (Codex web search), and the follow-up sentence clarifies that it only kicks off work rather than returning results. It does not differentiate itself from other codex-family siblings such as 'codex' or 'review', but the async-job nature makes its role distinguishable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what to do after calling it (waitCommand, waitCommandPosix, or job_status with jobId), which implies it must be paired with a polling step. However, it never states when to choose this tool over the plain 'codex' tool or when a search is appropriate at all, leaving selection guidance implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.