Skip to main content
Glama
ilhankilic

YaparAI MCP Server

by ilhankilic

get_template_detail

Retrieve detailed template information including input fields, output format, and credit cost to understand requirements before execution.

Instructions

Get full details of a template including its input parameters.

Returns the template's input fields (what you need to provide), output format, description, and credit cost. Use this before executing a template to understand its requirements. No credits charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesTemplate slug (from list_templates results)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for 'get_template_detail' — takes a slug and returns template details by calling the client.
    async def get_template_detail(
        slug: str,
    ) -> dict:
        """
        Get full details of a template including its input parameters.
    
        Returns the template's input fields (what you need to provide),
        output format, description, and credit cost. Use this before
        executing a template to understand its requirements.
        No credits charged.
    
        Args:
            slug: Template slug (from list_templates results)
    
        Returns:
            Dict with template details: name, description, io_inputs (required
            fields like prompt, image_url, etc.), credit_cost, and workflow info.
        """
        client = YaparAIClient()
        return await client.get_template(slug)
  • Registration of get_template_detail as an MCP tool in the FastMCP server.
    mcp.tool(get_template_detail)
  • Function signature defines the input schema: slug (str) is the only parameter, returns dict.
    async def get_template_detail(
        slug: str,
    ) -> dict:
        """
        Get full details of a template including its input parameters.
    
        Returns the template's input fields (what you need to provide),
        output format, description, and credit cost. Use this before
        executing a template to understand its requirements.
        No credits charged.
    
        Args:
            slug: Template slug (from list_templates results)
    
        Returns:
            Dict with template details: name, description, io_inputs (required
            fields like prompt, image_url, etc.), credit_cost, and workflow info.
        """
        client = YaparAIClient()
        return await client.get_template(slug)
  • HTTP client method that makes the actual GET request to /v1/comfy-templates/{slug} to retrieve template details.
    async def get_template(self, slug: str) -> dict:
        """Get template detail."""
        return await self._request("GET", f"/v1/comfy-templates/{slug}")
  • Import of get_template_detail from templates module into the server.
    from yaparai.tools.templates import (
        list_templates,
        get_template_detail,
        execute_template,
    )
Behavior4/5

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

With no annotations, the description fully discloses behavior: it returns input fields, output format, description, and credit cost, and states 'No credits charged'. It is clearly a read-only operation, though it doesn't explicitly state idempotency.

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 four sentences, each contributing value: purpose, return contents, usage guidance, and cost note. It is front-loaded and concise with no redundant words.

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

Completeness5/5

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

Given the presence of an output schema (not needing return structure detail), the description is complete: it explains what is returned, when to use it, and the cost implication. It differentiates well from related tools like list_templates and execute_template.

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?

The input schema covers the single parameter 'slug' with a description ('Template slug from list_templates results'), achieving 100% coverage. The description adds no new information about the parameter beyond what the schema already provides, so score is baseline.

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

Purpose5/5

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

The description clearly states the tool gets full details of a template, including input parameters, output format, description, and credit cost. It distinguishes itself from siblings like 'execute_template' (which runs the template) and 'list_templates' (which lists all templates) by focusing on detailed retrieval.

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

Usage Guidelines4/5

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

Explicitly advises 'Use this before executing a template to understand its requirements', providing clear when-to-use guidance. It does not explicitly state when not to use it, but the context implies it is not for execution.

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/ilhankilic/yaparai-mcp'

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