Skip to main content
Glama

set_prompts

Configure global task prompts by setting instructions, prefixes, and suffixes to standardize task formatting and provide consistent context across all tasks.

Instructions

Set the global prompts configuration with instructions, taskPrefix, and/or taskSuffix.

This replaces any existing prompts settings with the new values provided.

  • 'instructions': General instructions or context shown at the top of each task

  • 'taskPrefix': Text to prepend before each task description

  • 'taskSuffix': Text to append after each task description

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsNo
taskPrefixNo
taskSuffixNo

Implementation Reference

  • MCP tool handler for 'set_prompts': extracts instructions, taskPrefix, taskSuffix from args and calls service.setPrompts
    async set_prompts(args: any) {
      const { instructions, taskPrefix, taskSuffix } = args ?? {};
      return service.setPrompts({ instructions, taskPrefix, taskSuffix });
    },
  • Tool schema definition for 'set_prompts' including input schema for optional prompts fields: instructions, taskPrefix, taskSuffix
    export const SET_PROMPTS_TOOL: Tool = {
      name: "set_prompts",
      description:
        "Set the global prompts configuration with instructions, taskPrefix, and/or taskSuffix.\n\n" +
        "This replaces any existing prompts settings with the new values provided.\n\n" +
        "- 'instructions': General instructions or context shown at the top of each task\n" +
        "- 'taskPrefix': Text to prepend before each task description\n" +
        "- 'taskSuffix': Text to append after each task description",
      inputSchema: {
        type: "object",
        properties: {
          instructions: { type: "string" },
          taskPrefix: { type: "string" },
          taskSuffix: { type: "string" },
        },
      },
    };
  • Registration of SET_PROMPTS_TOOL in the server's listTools response handler, making it available to MCP clients
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        PLAN_TASK_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
        ADD_SUBTASKS_TOOL,
        MARK_SUBTASK_DONE_TOOL,
        UPDATE_SUBTASK_TOOL,
        DELETE_SUBTASK_TOOL,
        EXPORT_TASK_STATUS_TOOL,
        ADD_NOTE_TOOL,
        UPDATE_NOTE_TOOL,
        DELETE_NOTE_TOOL,
        ADD_DEPENDENCY_TOOL,
        GET_PROMPTS_TOOL,
        SET_PROMPTS_TOOL,
        UPDATE_PROMPTS_TOOL,
        REMOVE_PROMPTS_TOOL,
        ARCHIVE_COMPLETED_REQUESTS_TOOL,
        LIST_ARCHIVED_REQUESTS_TOOL,
        RESTORE_ARCHIVED_REQUEST_TOOL,
      ],
    }));
  • Core service method that updates the global prompts configuration in the task data file and saves it, implementing the actual logic called by the tool handler
    public async setPrompts(prompts: Partial<Prompts>) {
      await this.loadTasks();
      const now = new Date().toISOString();
      
      this.data.prompts = {
        instructions: prompts.instructions,
        taskPrefix: prompts.taskPrefix,
        taskSuffix: prompts.taskSuffix,
        createdAt: this.data.prompts?.createdAt || now,
        updatedAt: now,
      };
      
      // Remove undefined values
      Object.keys(this.data.prompts).forEach(key => {
        if (this.data.prompts![key as keyof Prompts] === undefined) {
          delete this.data.prompts![key as keyof Prompts];
        }
      });
      
      await this.saveTasks();
      
      return {
        status: "prompts_set",
        prompts: this.data.prompts,
        message: "Prompts configuration has been updated."
      };
    }
Behavior3/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 adds useful context: 'This replaces any existing prompts settings with the new values provided,' indicating a destructive overwrite behavior. However, it doesn't cover other important aspects like permissions needed, rate limits, error handling, or what happens if only some parameters are provided.

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 appropriately sized and well-structured. It starts with a clear purpose statement, follows with a critical behavioral note, and then provides bullet-point explanations for each parameter. Every sentence earns its place with no wasted words, making it easy to scan and understand.

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's complexity (mutating global configuration with 3 parameters), no annotations, and no output schema, the description is moderately complete. It covers the purpose, destructive behavior, and parameter meanings well, but lacks information about return values, error conditions, permissions, or how partial updates are handled, which would be helpful for a mutation tool.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate. It does so effectively by listing all three parameters ('instructions', 'taskPrefix', 'taskSuffix') and providing clear semantic explanations for each: 'General instructions or context shown at the top of each task', 'Text to prepend before each task description', and 'Text to append after each task description'. This adds significant value beyond the bare schema.

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 tool's purpose: 'Set the global prompts configuration with instructions, taskPrefix, and/or taskSuffix.' It specifies the verb ('Set'), resource ('global prompts configuration'), and scope ('instructions, taskPrefix, and/or taskSuffix'), though it doesn't explicitly differentiate from sibling tools like 'update_prompts' or 'remove_prompts'.

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?

The description implies usage by stating 'This replaces any existing prompts settings with the new values provided,' which suggests it should be used when replacing all prompts settings. However, it doesn't explicitly state when to use this tool versus alternatives like 'update_prompts' or 'remove_prompts,' nor does it provide clear exclusions or prerequisites.

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/pinkpixel-dev/taskflow-mcp'

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