get-markdown-from-media
Extract content from images and videos using AI, convert it into Markdown format for structured documentation. Ideal for transforming visual media into descriptive, text-based outputs.
Instructions
Performs AI-powered content extraction from media files (images and videos) and converts the results to Markdown format. Specialized tool for visual content analysis that utilizes computer vision and OCR capabilities to generate descriptive text from media sources.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the target web page (images, videos, etc.). |
Implementation Reference
- Executes the get-markdown-from-media tool by initializing an OpenAI client and using MarkItDown to convert the provided URL (media) to markdown text content.elif name == "get-markdown-from-media": if not config.OPENAI_API_KEY: raise ValueError("OPENAI_API_KEY is not set") client = OpenAI(api_key=config.OPENAI_API_KEY) md = MarkItDown(llm_client=client, llm_model=config.MODEL_NAME) result_string = md.convert(url).text_content
- src/mcp_server_fetch_python/server.py:54-64 (registration)Registers the get-markdown-from-media tool with the MCP server, including its description and input schema requiring a 'url' parameter.types.Tool( name="get-markdown-from-media", description="Performs AI-powered content extraction from media files (images and videos) and converts the results to Markdown format. Specialized tool for visual content analysis that utilizes computer vision and OCR capabilities to generate descriptive text from media sources.", # noqa: E501 inputSchema={ "type": "object", "properties": { "url": {"type": "string", "description":"URL of the target web page (images, videos, etc.)."} # noqa: E501 }, "required": ["url"], }, ),
- JSON schema for the get-markdown-from-media tool input, defining a required 'url' string parameter.inputSchema={ "type": "object", "properties": { "url": {"type": "string", "description":"URL of the target web page (images, videos, etc.)."} # noqa: E501 }, "required": ["url"], },