Skip to main content
Glama

get_file_approval_status

Check the approval status of a file using its file path to ensure compliance with safety controls and workflows on the MCP Memory Server.

Instructions

Get approval status for a file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file

Implementation Reference

  • MCP server handler for the get_file_approval_status tool. Parses input arguments, delegates to MemoryManager.getFileApprovalStatus, and returns the approval status as JSON text.
    case 'get_file_approval_status': { const filePath = args.filePath as string; const approval = await this.memoryManager.getFileApprovalStatus(filePath); return { content: [{ type: 'text', text: JSON.stringify(approval, null, 2) }] }; }
  • src/index.ts:616-625 (registration)
    Tool registration in the MCP server's list of available tools, including name, description, and input schema definition.
    name: 'get_file_approval_status', description: 'Get approval status for a file', inputSchema: { type: 'object', properties: { filePath: { type: 'string', description: 'Path to the file' } }, required: ['filePath'] } },
  • Implementation of getFileApprovalStatus method in MemoryManager class. Loads project memory, computes relative file path, and retrieves or returns null for the file's approval status.
    async getFileApprovalStatus(filePath: string): Promise<ApprovalStatus | null> { const memory = await this.getProjectMemory(); const relativePath = path.relative(this.projectRoot, filePath); return memory.approvalStates[relativePath] || null; }

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/keleshteri/mcp-memory'

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