get_allowed_commands
Retrieve the list of commands permitted for execution in the current project, ensuring secure command use based on project-specific configurations.
Instructions
Get list of commands that are allowed to run in this project
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_allowed_commands"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Core handler that loads the project config and formats the list of allowed commands and custom tools into a text response.
async getAllowedCommands(): Promise<ToolResult> { try { const config = await this.configService.loadProjectConfig(); let commandText = 'Allowed Commands:\n'; commandText += config.allowedCommands.map(cmd => `• ${cmd}`).join('\n'); if (config.customTools && config.customTools.length > 0) { commandText += '\n\nCustom Tools:\n'; commandText += config.customTools.map(tool => `• ${tool.name}: ${tool.description}` ).join('\n'); } return { content: [{ type: 'text', text: commandText }] }; } catch (error) { return { isError: true, content: [{ type: 'text', text: `Failed to get allowed commands: ${error}` }] }; } - src/toolDefinitions.ts:967-973 (schema)Input schema definition: no parameters required, returns list of allowed commands.
{ name: 'get_allowed_commands', description: 'Get list of commands that are allowed to run in this project', inputSchema: { type: 'object', properties: {}, } - src/index.ts:343-344 (registration)Routes the 'get_allowed_commands' case to SecureCommandService.getAllowedCommands().
case 'get_allowed_commands': return await this.secureCommandService.getAllowedCommands();