Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

image_info

Extract image format, dimensions, and color model details from any URL to analyze media files for processing or validation needs.

Instructions

Retrieves basic image information, including image format, size, and color model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_urlYesThe 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

  • Handler function for 'image_info' tool, including schema definition in tool_meta decorator. Processes image URL by appending 'imageInfo' FOP and returns updated URL.
    @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"],
            },
        )
    )
    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,
                })
            )
        ]
  • Registers the image_info tool implementation using 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,
            ]
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information (implying read-only), but doesn't cover critical aspects like error handling (e.g., invalid URLs), performance (e.g., latency), authentication needs, or rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Retrieves basic image information') and specifies key details (format, size, color model). There is no wasted language or redundancy, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers what the tool does but lacks context on usage, behavioral traits, or output format. Without annotations or an output schema, the description should ideally explain the return structure (e.g., JSON with fields), but it doesn't, leaving room for improvement in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'object_url' well-documented in the schema (URL of the image, length constraints, examples of sources). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieves') and resource ('basic image information'), specifying the exact data returned (format, size, color model). It distinguishes itself from siblings like 'get_object' (which likely retrieves the full image data) by focusing on metadata extraction rather than file retrieval. However, it doesn't explicitly contrast with all siblings, keeping it at a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a URL from 'get_object_url'), exclusions (e.g., not for video files), or comparisons to similar tools like 'get_object'. Without this context, an agent might misuse it or overlook better options.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/qiniu/qiniu-mcp-server'

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