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'],
      },
    },

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