Skip to main content
Glama

get_prompt_program

Generate functional pseudo-code prompt templates for math or debate programs to structure LLM reasoning tasks.

Instructions

Returns a functional pseudo-code prompt template (Module 07).

Args:
    program_type: The type of program ('math', 'debate').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
program_typeNomath

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'get_prompt_program' tool. Decorated with @mcp.tool() for automatic registration. Validates input using PromptProgramInput schema and delegates to get_program_template helper.
    @mcp.tool()
    def get_prompt_program(program_type: str = "math") -> str:
        """
        Returns a functional pseudo-code prompt template (Module 07).
    
        Args:
            program_type: The type of program ('math', 'debate').
        """
        try:
            model = PromptProgramInput(program_type=program_type)
        except ValidationError as e:
            return f"Input Validation Error: {e}"
    
        return get_program_template(model.program_type)
  • Pydantic input model used for validating the program_type parameter in the get_prompt_program tool.
    class PromptProgramInput(BaseModel):
        program_type: str = Field(
            "math", pattern="^(math|debate)$", description="Program type."
        )
  • Helper function that selects and returns the appropriate prompt program template (math or debate) based on the program_type.
    def get_program_template(program_type: str) -> str:
        """Return a prompt program template for the requested type.
    
        Args:
            program_type: Identifier for the program to generate (e.g., "math", "debate").
    
        Returns:
            Template string for the requested program, or a generic message with
            the math solver template when unsupported.
        """
        normalized_type = program_type.lower()
        if normalized_type == "math":
            return PROMPT_PROGRAM_MATH_TEMPLATE
        elif normalized_type == "debate":
            return PROMPT_PROGRAM_DEBATE_TEMPLATE
        return (
            f"// Program type '{program_type}' not yet implemented. Returning generic structure.\\n"
            + PROMPT_PROGRAM_MATH_TEMPLATE
        )
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns something, implying a read-only operation, but does not specify any behavioral traits like error handling, performance characteristics, or what 'Module 07' entails. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 brief and front-loaded, with the core purpose stated first followed by parameter details. Both sentences are relevant and add value, avoiding redundancy. However, the mention of 'Module 07' is somewhat cryptic and could be clarified to improve efficiency.

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 has one parameter with low schema coverage (0%) but an output schema exists, the description is minimally adequate. It explains the parameter semantics but lacks details on behavioral aspects and usage context. The presence of an output schema reduces the need to describe return values, but overall completeness is limited for effective agent use.

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

Parameters4/5

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

The description adds meaningful context for the single parameter 'program_type' by listing possible values ('math', 'debate'), which the input schema does not include (0% coverage). This compensates well for the schema's lack of detail, providing essential semantic information that helps the agent understand valid inputs.

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 the tool 'Returns a functional pseudo-code prompt template (Module 07)', which provides a clear verb ('Returns') and resource ('pseudo-code prompt template'), but lacks specificity about what distinguishes it from siblings like 'get_cell_protocol' or 'get_molecular_template'. The mention of 'Module 07' adds some context but doesn't fully clarify the tool's unique role.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention any prerequisites, exclusions, or contextual cues for selection among the many sibling tools, such as 'analyze_task_complexity' or 'understand_question', leaving the agent without direction on appropriate usage scenarios.

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/4rgon4ut/sutra'

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