-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for configs #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Managing Configs | ||
|
|
||
| Configs are key-value pairs that can be used to store sensitive information such as API keys, database credentials, or any other configuration data that should not be hardcoded into your application. | ||
|
|
||
| **IMPORTANT**: | ||
| Do not assume default values for configs; always prompt the user for input. For example, do not assume a default password for a database config is always randomly generated. Always present the user with the options to provide a value or choose to generate a random one before setting each config. | ||
|
|
||
| ## Viewing Configs | ||
|
|
||
| To view the current configs for your project, use the following MCP tool: | ||
|
|
||
| ```bash | ||
| list_configs | ||
| ``` | ||
|
|
||
| This will display a list of all the configs currently set for your project. This list does not represent configs you are still required to set; it only shows what has already been set. | ||
|
|
||
| ## Setting Configs | ||
|
|
||
| To set a config, use the following MCP tool: | ||
|
|
||
| ```bash | ||
| set_config | ||
| ``` | ||
|
|
||
| When setting configs, make sure to ask the user for either a specific value or whether to generate a random value. Do not assume choices on behalf of the user. | ||
|
|
||
| **IMPORTANT**: | ||
| When using the `set_config` tool, ensure that only one of the following options is provided: either the `value` parameter or the `random` flag. | ||
| Providing both will result in an error. | ||
| Example: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "POSTGRES_PASSWORD", | ||
| "value": "helloworld123", | ||
| "random": true, | ||
| "working_directory": "." | ||
| } | ||
| ``` | ||
|
|
||
| Available parameters: | ||
|
|
||
| - `name` (required): The key for the config you want to set. | ||
| - `value` (optional): The value for the config. Do not provide this parameter if you are using the `random` parameter. | ||
| Example: | ||
| ```json | ||
| { | ||
| "name": "POSTGRES_PASSWORD", | ||
| "value": "helloworld123", | ||
| "working_directory": "." | ||
| } | ||
| ``` | ||
| - `random` (optional): If this flag is provided, a random value will be generated for the config. Do not provide the `value` parameter if you are using this parameter. | ||
| Example: | ||
| ```json | ||
| { | ||
| "name": "POSTGRES_PASSWORD", | ||
| "random": true, | ||
| "working_directory": "." | ||
| } | ||
| ``` | ||
|
|
||
| ## Deleting Configs | ||
|
|
||
| To delete a config, use the following MCP tool: | ||
|
|
||
| ```bash | ||
| remove_config | ||
| ``` | ||
|
|
||
| This will remove the specified config from your project. | ||
|
Comment on lines
+18
to
+72
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of this is roughly redundant to our tool descriptions
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I tested this in Kiro, it didn’t seem to have enough context on how to manage configurations. I ran experiments without this file before creating it, and the tool was not able to reliably set configs until the file was added. It’s possible that the Kiro team hasn’t fully implemented reading tool parameter descriptions yet. For example, the Terraform Power includes a dedicated file that explains how to use their MCP server, which likely helps provide that missing context.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we be amending our tool descriptions? |
||
|
|
||
| ## Best Practices | ||
|
|
||
| - Avoid hardcoding sensitive information in your codebase. Use configs instead. | ||
| - Regularly rotate sensitive configs such as API keys and passwords. | ||
| - Use descriptive keys for your configs to make them easily identifiable. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? We have tool descriptions which should serve this purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4 (comment)