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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Config key | |
| value | Yes | New value |
Implementation Reference
- src/config/profile.js:48-53 (handler)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; } - bin/prompte-mcp.js:215-219 (handler)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); } - bin/prompte-mcp.js:116-126 (registration)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'], }, },