Skip to main content
Glama

removeProjectCommand

Delete a command override for a specific project in the Smart Shell MCP Server to remove custom command mappings and restore default behavior.

Instructions

Delete a command override for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYes
keyYes

Implementation Reference

  • The MCP tool handler for 'removeProjectCommand', which invokes the core logic function and formats the JSON response.
    async ({ projectName, key }) => { const res = await removeProjectCommand(projectName, key); return { content: [{ type: "text", text: JSON.stringify({ projectName, key, ...res }, null, 2) }] }; }
  • Input schema definition for the removeProjectCommand tool, specifying projectName and key parameters.
    { title: "Remove a project command", description: "Delete a command override for a project", inputSchema: { projectName: z.string(), key: z.string() } },
  • src/server.ts:409-420 (registration)
    Registration of the 'removeProjectCommand' tool using server.registerTool, including name, schema, and handler.
    server.registerTool( "removeProjectCommand", { title: "Remove a project command", description: "Delete a command override for a project", inputSchema: { projectName: z.string(), key: z.string() } }, async ({ projectName, key }) => { const res = await removeProjectCommand(projectName, key); return { content: [{ type: "text", text: JSON.stringify({ projectName, key, ...res }, null, 2) }] }; } );
  • Core helper function that performs the removal of a project command from the JSON storage, checking existence and saving changes.
    async function removeProjectCommand(projectName: string, key: string) { const data = await loadJson<Record<string, Record<string, string>>>(PROJECT_COMMANDS_PATH, { default: {} }); if (!data[projectName]) return { removed: false }; const existed = Object.prototype.hasOwnProperty.call(data[projectName], key); delete data[projectName][key]; await saveJson(PROJECT_COMMANDS_PATH, data); return { removed: existed };

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/mr-wolf-gb/smart-shell-mcp'

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