Skip to main content
Glama

search_web

Search the web for information using structured queries and return organized results. Specify a country code to get localized search results.

Instructions

Search the web for a given query and return structured results (non-AI, parser-based).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query
countryNoOptional country code for localized results (e.g., US, GB).US

Implementation Reference

  • The handler function for the 'search_web' tool, which delegates to the getGoogleSearch.handler with the provided query, country, API key, and orbit key.
    handler: async (
    	{ query, country }: { query: string; country?: string },
    	apiKey: string,
    	orbitKey?: string,
    ) => {
    	// Reuse the same underlying Google parser-based search
    	return getGoogleSearch.handler({ query, country }, apiKey, orbitKey);
    },
  • Zod-based input schema for the 'search_web' tool defining 'query' (required string) and 'country' (optional string, default 'US').
    schema: {
    	query: z.string().describe("Search query"),
    	country: z
    		.string()
    		.optional()
    		.default("US")
    		.describe("Optional country code for localized results (e.g., US, GB)."),
    },
  • src/index.ts:104-116 (registration)
    MCP server registration for the 'search_web' tool using server.tool(), including API key check and response formatting wrapper.
    server.tool(
        searchWeb.name,
        searchWeb.description,
        searchWeb.schema,
        async (params) => {
            if (!OLOSTEP_API_KEY) return missingApiKeyError;
            const result = await searchWeb.handler(params, OLOSTEP_API_KEY, ORBIT_KEY);
            return {
                ...result,
                content: result.content.map(item => ({ ...item, type: item.type as "text" }))
            };
        }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'parser-based' and 'non-AI' which adds some behavioral context, but fails to disclose critical traits like rate limits, authentication needs, result format, pagination, or error handling for a web search tool.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words, clearly front-loading the core functionality. Every part earns its place by specifying the action, resource, and method.

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

Completeness2/5

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

Given the complexity of web search and lack of annotations or output schema, the description is incomplete. It omits details on result structure, limitations, error cases, and how it differs from siblings, leaving significant gaps for agent understanding.

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%, so the schema already documents both parameters ('query' and 'country'). The description adds no additional meaning beyond what the schema provides, such as query formatting tips or country code examples, meeting the baseline for high schema coverage.

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?

The description clearly states the verb ('Search') and resource ('the web'), specifying it returns structured results via parser-based (non-AI) methods. It distinguishes from AI-based search tools but doesn't explicitly differentiate from sibling tools like 'google_search' or 'answers'.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'google_search' or 'answers', nor does it mention prerequisites or exclusions. The description implies a general web search context but lacks explicit usage instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olostep/olostep-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server