image_info
Extract image details including format, dimensions, and color model by providing the image URL. This tool enables quick retrieval of basic image metadata for analysis or processing.
Instructions
Retrieves basic image information, including image format, size, and color model.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_url | Yes | The URL of the image. This can be a URL obtained via the GetObjectURL tool or a URL generated by other Fop tools. Length Constraints: Minimum length of 1. |
Implementation Reference
- The handler function for the 'image_info' tool, which validates the object_url and appends the 'imageInfo' FOP to generate image information.def image_info(self, **kwargs) -> list[types.TextContent]: object_url = kwargs.get("object_url", "") if object_url is None or len(object_url) == 0: return [ types.TextContent( type="text", text="object_url is required" ) ] func = "imageInfo" object_url = utils.url_add_processing_func(auth=self.auth, url=object_url, func=func) return [ types.TextContent( type="text", text=str({ "object_url": object_url, }) ) ]
- The tool metadata including schema definition for 'image_info', specifying the required 'object_url' input.@tools.tool_meta( types.Tool( name="image_info", description="Retrieves basic image information, including image format, size, and color model.", inputSchema={ "type": "object", "properties": { "object_url": { "type": "string", "description": _OBJECT_URL_DESC }, }, "required": ["object_url"], }, ) )
- src/mcp_server/core/media_processing/tools.py:258-268 (registration)The registration function that registers the 'image_info' tool along with others using tools.auto_register_tools.def register_tools(cfg: config.Config, cli: MediaProcessingService): tool_impl = _ToolImpl(cfg, cli) tools.auto_register_tools( [ tool_impl.image_scale_by_percent, tool_impl.image_scale_by_size, tool_impl.image_round_corner, tool_impl.image_info, ] )