fourget_image_search
Search for images using the 4get meta search engine. Returns results with URLs, thumbnails, and metadata while supporting pagination and various filters.
Instructions
Search for images using the 4get meta search engine. Returns image results with URLs, thumbnails, and metadata. Supports pagination via the 'npt' token and various image filters.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| page_token | No | ||
| engine | No | Optional search engine override (maps to 4get "scraper" query parameter). | |
| extra_params | No |
Implementation Reference
- src/server.py:154-164 (handler)The MCP tool handler function that executes the image search logic by delegating to FourGetClient.image_search with combined options.async def fourget_image_search( query: str, page_token: str | None = None, engine: EngineParam = None, extra_params: dict[str, Any] | None = None, ) -> dict[str, Any]: return await client.image_search( query=query, page_token=page_token, options=combine_options(engine, extra_params), )
- src/server.py:146-153 (registration)Registers the 'fourget_image_search' tool with FastMCP, providing name and description. The decorator internally calls mcp.tool().@register_tool( name='fourget_image_search', description=( 'Search for images using the 4get meta search engine. Returns image ' 'results with URLs, thumbnails, and metadata. Supports pagination ' "via the 'npt' token and various image filters." ), )
- src/server.py:52-55 (schema)Type definition for the 'engine' parameter used in the tool's input schema.EngineParam = Annotated[ SearchEngine | None, Field(description='Optional search engine override (maps to 4get "scraper" query parameter).'), ]
- src/server.py:113-123 (helper)Helper function used by the handler to combine the engine override and extra parameters into the options dictionary passed to the client.def combine_options( engine: SearchEngine | None, extras: dict[str, Any] | None ) -> dict[str, Any] | None: if engine is None and not extras: return None options = dict(extras) if extras else {} if engine is not None: options['scraper'] = engine.value return options