Skip to main content
Glama

set_config

Write configuration values to customize prompt enhancement techniques in the Prompte-MCP server, enabling tailored optimization of AI responses through local settings.

Instructions

Write a config value to ~/.prompte/config.json

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesConfig key
valueYesNew value

Implementation Reference

  • The `setConfig` function updates the global configuration by reading the current config, setting the provided key-value pair, and saving it to `~/.prompte/config.json`.
    export function setConfig(key, value) {
      const config = getConfig();
      config[key] = value;
      writeJSON(CONFIG_FILE, config);
      return config;
    }
  • The `set_config` tool handler in the MCP server dispatch function, which calls `setConfig` from `src/config/profile.js` with parameters provided in the MCP request.
    case 'set_config': {
      const { key, value } = args;
      if (!key) throw new Error('key is required');
      return setConfig(key, value);
    }
  • The definition and registration of the `set_config` tool, including its input schema, inside the `tools/list` handler of `bin/prompte-mcp.js`.
      name: 'set_config',
      description: 'Write a config value to ~/.prompte/config.json',
      inputSchema: {
        type: 'object',
        properties: {
          key: { type: 'string', description: 'Config key' },
          value: { description: 'New value' },
        },
        required: ['key', 'value'],
      },
    },
Behavior3/5

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

Discloses the specific file path (~/.prompte/config.json) which is crucial context absent from annotations. However, with no annotations provided, fails to disclose mutation semantics: whether it overwrites existing keys, creates the file if missing, or validates values. Carries partial burden for a destructive operation.

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?

Single efficient sentence with zero waste. Front-loaded with action verb and fully qualified path. Appropriate length for a simple 2-parameter tool.

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?

Adequate for a flat 2-parameter mutation tool: identifies the operation, target file, and required inputs. However, with no output schema and no annotations, the description should ideally disclose overwrite behavior and file auto-creation policy to be complete.

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 100% with 'Config key' and 'New value' descriptions. Description adds no additional parameter semantics beyond what the schema provides, meeting the baseline score for high-coverage schemas.

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?

Clear specific verb 'Write', resource 'config value', and precise location '~/.prompte/config.json'. Implicitly distinguishes from sibling 'get_config' by indicating this is the write counterpart.

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 explicit guidance on when to use vs alternatives, prerequisites (e.g., directory existence), or conditions (creates file vs requires existing file). Only states what it does, not when to choose it.

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/AlanRoybal/prompte-mcp'

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