Skip to main content
Glama

Execute Prompt With Llm

execute_prompt_with_llm

Fetch an MCP prompt, fill template variables, and run it through an LLM to get the response.

Instructions

Execute a prompt with an LLM and return the response.

This tool performs the complete workflow:

  1. Retrieves the prompt from the connected MCP server with prompt_arguments

  2. Optionally fills template variables in the prompt messages

  3. Sends the prompt messages to an LLM

  4. Returns the LLM's response along with metadata

Supports two prompt patterns:

  • Standard MCP prompts: Pass arguments via prompt_arguments, server handles substitution

  • Template variables: Use fill_variables to replace {variable} placeholders in messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
llm_configNoLLM configuration (url, model, api_key, etc.)
prompt_nameYesName of the prompt to execute
fill_variablesNoTemplate variables to fill in prompt messages (JSON object or string)
prompt_argumentsNoArguments to pass to the MCP prompt (JSON object or string)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.2
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, and the description does not mention potential side effects such as external LLM calls, network usage, cost, or failure modes. This leaves important behavioral aspects undisclosed.

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 reasonably concise and well-structured with a short summary and a numbered workflow. It could be slightly tighter but remains focused and easy to follow.

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?

The description gives enough context to understand the basic execution flow and return type, but lacks information about error handling, prerequisites, or side effects. It is adequate for a tool of moderate complexity.

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 schema already covers all parameters with descriptions. The tool description adds context about the two prompt patterns but does not significantly extend beyond the schema's own parameter explanations.

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's purpose with a specific verb ('Execute') and object ('a prompt with an LLM'), and distinguishes it from sibling tools like get_prompt and call_tool.

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?

The description explains the overall workflow and the two supported prompt patterns, giving useful context. It does not explicitly contrast with sibling tools, but the execution-focused wording makes the intended use clear.

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