Skip to main content
Glama
yanlong-iao

Ultimate Prompt Optimizer

by yanlong-iao

Generate LangGPT prompt

generate_langgpt_structure

Expand a brief idea into a strict LangGPT Markdown system prompt with Role, Profile, Goals, Rules, Workflow, and OutputFormat sections, validating that each reference points to an existing section.

Instructions

Expand a brief idea into a strict LangGPT Markdown system prompt. Default style 'v2' follows the current LangGPT spec (Role, Profile, Background, Goal with Outcome/Done Criteria/Non-Goals, Skill-N subsections, Rules, Workflow, OutputFormat, optional Commands/Reminder/Examples, Initialization); 'classic' uses Goals/Constraints/Skills lists. With an LLM configured the content is domain-specific (the model fills a validated JSON spec; Markdown is rendered deterministically, so structure is guaranteed). Checks that every points to an existing section. 1 API call (0 with strategy=template).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ideaYesBrief description of the assistant/prompt you want
roleNoExplicit role name; inferred if omitted
styleNov2
authorNo
skillsNo
audienceNo
languageNoauto
strategyNoauto = LLM if configured, else deterministic templateauto
constraintsNoRules that must appear verbatim
targetModelNoweak = shorter, flatter prompt for small modelsstrong
outputFormatNoRequired response format
includeCommandsNoAdd a LangGPT ## Commands section (/help, /continue, /improve)
includeReminderNoAdd a ## Reminder section for long conversations

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden well: it discloses cost ('1 API call, 0 with strategy=template'), the LLM-vs-template fallback ('auto = LLM if configured'), the validated-JSON-then-deterministic-render guarantee, and a cross-reference validation pass. It stops short of stating any side effects on stored prompts.

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?

One dense paragraph, front-loaded with purpose and then the style variants, guarantees, and cost. It is information-rich with little waste, though the parenthetical enumeration of the v2 spec is heavy for a single sentence.

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

Completeness4/5

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

For a 13-parameter tool with no annotations and no output schema, the description covers the essentials: what the output structure looks like in each style, the LLM/template modes, the validation step, and API cost. Remaining gaps are per-parameter semantics rather than conceptual context.

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 coverage is 62%, and the description meaningfully expands the 'style' enum (which the schema leaves undescribed) and 'strategy' behavior. However, most of the 13 parameters (role, author, skills, audience, language, targetModel, outputFormat, include*) get no mention in the description.

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?

States a specific verb and resource: 'Expand a brief idea into a strict LangGPT Markdown system prompt.' The output artifact (strict LangGPT Markdown) is concrete and distinguishes it from generic prompt siblings like optimize_prompt_via_api or analyze_prompt.

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

Usage Guidelines3/5

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

It explains the style/strategy switches (v2 vs classic, auto/llm/template) but never says when to reach for this tool versus optimizing or analyzing an existing prompt. Usage is implied by the output type rather than explicitly scoped against siblings.

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