Skip to main content
Glama

tavily-extract

Extract and process web content from specified URLs for data collection, research, and analysis. Choose extraction depth (basic or advanced) and opt to include images in the response.

Instructions

A powerful web content extraction tool that retrieves and processes raw content from specified URLs, ideal for data collection, content analysis, and research tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
extract_depthNoDepth of extraction - 'basic' or 'advanced', if usrls are linkedin use 'advanced' or if explicitly told to use advancedbasic
include_imagesNoInclude a list of images extracted from the urls in the response
urlsYesList of URLs to extract content from

Implementation Reference

  • Core handler function that executes the tavily-extract tool logic by making an authenticated POST request to Tavily's extract API endpoint.
    async extract(params: any): Promise<TavilyResponse> { try { const response = await this.axiosInstance.post(this.baseURLs.extract, { ...params, api_key: API_KEY }); return response.data; } catch (error: any) { if (error.response?.status === 401) { throw new Error('Invalid API key'); } else if (error.response?.status === 429) { throw new Error('Usage limit exceeded'); } throw error; } }
  • Dispatch handler within the CallToolRequestSchema that routes tavily-extract calls to the extract method with parsed arguments.
    case "tavily-extract": response = await this.extract({ urls: args.urls, extract_depth: args.extract_depth, include_images: args.include_images }); break;
  • src/index.ts:191-216 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and input schema for tavily-extract.
    { name: "tavily-extract", description: "A powerful web content extraction tool that retrieves and processes raw content from specified URLs, ideal for data collection, content analysis, and research tasks.", inputSchema: { type: "object", properties: { urls: { type: "array", items: { type: "string" }, description: "List of URLs to extract content from" }, extract_depth: { type: "string", enum: ["basic","advanced"], description: "Depth of extraction - 'basic' or 'advanced', if usrls are linkedin use 'advanced' or if explicitly told to use advanced", default: "basic" }, include_images: { type: "boolean", description: "Include a list of images extracted from the urls in the response", default: false, } }, required: ["urls"] } },
  • Defines the API endpoint URL for the tavily-extract tool (extract: 'https://api.tavily.com/extract').
    private baseURLs = { search: 'https://api.tavily.com/search', extract: 'https://api.tavily.com/extract', crawl: 'https://api.tavily.com/crawl', map: 'https://api.tavily.com/map' };
  • src/index.ts:611-612 (registration)
    Secondary registration of tavily-extract in CLI listTools function.
    name: "tavily-extract", description: "Extracts and processes content from specified URLs with advanced parsing capabilities. Supports both basic and advanced extraction modes, with the latter providing enhanced data retrieval including tables and embedded content. Ideal for data collection, content analysis, and research tasks."

Other Tools

Related 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/jackedelic/tavily-mcp'

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