search
Perform Google searches directly within the Steel MCP Server to find information, answer questions, or gather data using web navigation capabilities.
Instructions
Perform a Google search by navigating to https://www.google.com/search?q=encodedQuery using the provided query text.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The text to search for on Google |
Implementation Reference
- src/index.ts:625-642 (handler)The handler function that implements the core logic of the 'search' tool: validates the query input, encodes it, navigates to the Google search URL using Puppeteer page.goto, and returns a success message.async function handleSearch(page: Page, args: any): Promise<CallToolResult> { const { query } = args; if (!query) { return { isError: true, content: [ { type: "text", text: "Query parameter is required for search" }, ], }; } const encodedQuery = encodeURIComponent(query); const url = `https://www.google.com/search?q=${encodedQuery}`; await page.goto(url); return { isError: false, content: [{ type: "text", text: `Searched Google for "${query}"` }], }; }
- src/index.ts:471-481 (schema)Defines the input schema for the 'search' tool, specifying an object with a required 'query' string property.inputSchema: { type: "object", properties: { query: { type: "string", description: "The text to search for on Google", }, }, required: ["query"], }, },
- src/index.ts:467-481 (registration)The 'search' tool definition object within the TOOLS array, which is returned by the ListToolsRequestHandler to register the tool with MCP clients.{ name: "search", description: "Perform a Google search by navigating to https://www.google.com/search?q=encodedQuery using the provided query text.", inputSchema: { type: "object", properties: { query: { type: "string", description: "The text to search for on Google", }, }, required: ["query"], }, },
- src/index.ts:919-921 (registration)Registers the 'search' tool handler in the switch statement of the main handleToolCall dispatcher function.case "search": result = await handleSearch(page, args); break;