Skip to main content
Glama

sjtu_vision

Analyze images by submitting a prompt and an image via URL or local path. The vision model returns understanding of the image content.

Instructions

Run an image understanding task against the default vision model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
image_pathNo
image_urlNo
modelNo
system_promptNo
temperatureNo
max_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `sjtu_vision` tool handler: an async function that runs an image understanding task against the default vision model using the SjtuClient.
    async def sjtu_vision(
        prompt: str,
        image_path: str | None = None,
        image_url: str | None = None,
        model: str | None = None,
        system_prompt: str | None = None,
        temperature: float = 0.2,
        max_tokens: int | None = None,
    ) -> str:
        """Run an image understanding task against the default vision model."""
        response = await client.chat(
            model=model or settings.default_vision_model,
            messages=_build_vision_messages(
                prompt,
                image_path=image_path,
                image_url=image_url,
                system_prompt=system_prompt,
            ),
            temperature=temperature,
            max_tokens=max_tokens,
        )
        return _extract_text(response)
  • Input parameters (schema) for sjtu_vision: prompt, image_path, image_url, model, system_prompt, temperature, max_tokens.
        prompt: str,
        image_path: str | None = None,
        image_url: str | None = None,
        model: str | None = None,
        system_prompt: str | None = None,
        temperature: float = 0.2,
        max_tokens: int | None = None,
    ) -> str:
  • The `@mcp.tool()` decorator registers sjtu_vision as an MCP tool on the FastMCP server.
    @mcp.tool()
    async def sjtu_vision(
  • `_build_vision_messages` helper that constructs the messages payload including the image (from path or URL) and optional system prompt.
    def _build_vision_messages(
        prompt: str,
        *,
        image_path: str | None,
        image_url: str | None,
        system_prompt: str | None,
    ) -> list[dict[str, Any]]:
        if not image_path and not image_url:
            raise ValueError("Provide either image_path or image_url.")
    
        image_source = image_url or image_path_to_data_url(image_path or "")
        user_content = [
            {"type": "text", "text": prompt},
            {"type": "image_url", "image_url": {"url": image_source}},
        ]
    
        messages: list[dict[str, Any]] = []
        if system_prompt:
            messages.append({"role": "system", "content": system_prompt})
        messages.append({"role": "user", "content": user_content})
        return messages
Behavior2/5

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

With no annotations, the description bears full responsibility for behavioral disclosure. It only states that the tool runs an image understanding task, but does not explain side effects, authentication needs, return type, or limitations. The minimal description is insufficient for safe usage.

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

Conciseness4/5

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

The description is a single short sentence with no extraneous content. However, it sacrifices clarity for brevity; it could be more informative without adding much length.

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

Completeness2/5

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

Given 7 parameters, no annotations, and an existing but undescribed output schema, the description is too minimal. It does not explain parameter interplay (e.g., image_path vs image_url) or output format, leaving significant gaps for effective invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It adds no explanation for parameters such as prompt, image_path, image_url, model, system_prompt, temperature, or max_tokens, leaving their semantics entirely to interpretation from names.

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

Purpose3/5

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

The description states 'Run an image understanding task against the default vision model', which clearly indicates a verb and resource. However, 'image understanding task' is vague and does not specify the exact capability (e.g., captioning, VQA), and it fails to distinguish from sibling tools like sjtu_cheap_task or sjtu_text.

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?

There is no guidance on when to use this tool over alternatives like sjtu_cheap_task or sjtu_text. No prerequisites or exclusions are mentioned, leaving the agent to guess appropriate contexts.

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/EternalWavee/sjtu-mcp'

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