Skip to main content
Glama

list_prompts

Discover available prompt templates, wizards, and workflows to streamline interactions with the Letta system.

Instructions

List all available prompt templates including wizards and workflows

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptsYes
total_promptsYesTotal number of available prompts

Implementation Reference

  • The primary handler function for the 'list_prompts' tool. It retrieves all registered prompts from the promptRegistry, maps them to a simplified structure, and returns both a textual JSON representation and structured content with total count and prompt details.
    export async function handleListPrompts(server) {
        try {
            const prompts = Array.from(promptRegistry.values()).map((p) => ({
                name: p.name,
                title: p.title || p.name,
                description: p.description,
                arguments: p.arguments || [],
            }));
    
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify(
                            {
                                total_prompts: prompts.length,
                                prompts,
                            },
                            null,
                            2,
                        ),
                    },
                ],
                structuredContent: {
                    total_prompts: prompts.length,
                    prompts,
                },
            };
        } catch (error) {
            return server.createErrorResponse(error, 'Failed to list prompts');
        }
    }
  • Tool definition including inputSchema (empty object, no arguments required) and detailed outputSchema specifying the structure of the response with total_prompts and an array of prompts.
    export const listPromptsToolDefinition = {
        name: 'list_prompts',
        description: 'List all available prompt templates including wizards and workflows',
        inputSchema: {
            type: 'object',
            properties: {},
        },
        outputSchema: {
            type: 'object',
            properties: {
                total_prompts: {
                    type: 'integer',
                    description: 'Total number of available prompts',
                },
                prompts: {
                    type: 'array',
                    items: {
                        type: 'object',
                        properties: {
                            name: { type: 'string' },
                            title: { type: 'string' },
                            description: { type: 'string' },
                            arguments: {
                                type: 'array',
                                items: {
                                    type: 'object',
                                    properties: {
                                        name: { type: 'string' },
                                        title: { type: 'string' },
                                        description: { type: 'string' },
                                        required: { type: 'boolean' },
                                    },
                                },
                            },
                        },
                    },
                },
            },
            required: ['total_prompts', 'prompts'],
        },
    };
  • Registration of the 'list_prompts' tool handler in the central tool dispatch switch statement within registerToolHandlers function.
    case 'list_prompts':
        return handleListPrompts(server, request.params.arguments);
  • Inclusion of listPromptsToolDefinition in the allTools array used for tool listing and enhancement.
    listPromptsToolDefinition,
  • The promptRegistry Map used by the handleListPrompts function to store and retrieve registered prompts.
    export const promptRegistry = new Map();
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is to 'List', implying a read-only operation, but doesn't describe any behavioral traits such as pagination, sorting, filtering, rate limits, or authentication requirements. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 a single, clear sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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 0 parameters, 100% schema coverage, and an output schema exists (so return values are documented elsewhere), the description is minimally adequate. However, it lacks behavioral context (e.g., how prompts are organized or returned) and usage guidelines, which are important for a listing tool in a context with many siblings like 'use_prompt'. It meets basic needs but has clear gaps.

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 input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately doesn't discuss parameters, which is efficient. A baseline score of 4 is applied since the schema fully documents the absence of parameters, and the description doesn't add unnecessary details.

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

Purpose4/5

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

The description clearly states the verb 'List' and the resource 'all available prompt templates including wizards and workflows', which is specific and unambiguous. It distinguishes the tool's scope from generic listing tools like list_agents or list_memory_blocks by focusing on prompt templates, though it doesn't explicitly differentiate from the sibling tool 'use_prompt' (which likely applies rather than lists prompts).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for listing prompts (e.g., for selection before using 'use_prompt'), or exclusions. Without such information, the agent must infer usage from the tool name and sibling tools alone.

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/oculairmedia/Letta-MCP-server'

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