get_allowed_paths
Retrieves a list of accessible file paths within restricted directories, ensuring secure access to system information and file operations.
Instructions
アクセス可能なパスの一覧を表示します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:482-493 (handler)Primary handler for the get_allowed_paths tool. Fetches allowed paths from PathValidator and formats response as CallToolResult.private async getAllowedPaths(): Promise<CallToolResult> { const allowedPaths = this.pathValidator.getAllowedPaths(); return { content: [ { type: "text", text: `アクセス可能なパス一覧:\n\n${allowedPaths.map(p => `📁 ${p}`).join('\n')}\n\n注意: これらのディレクトリとそのサブディレクトリのみアクセス可能です。`, }, ], isError: false, }; }
- src/index.ts:182-189 (registration)Tool registration in the TOOLS constant array, which is returned by ListToolsRequestHandler.{ name: "get_allowed_paths", description: "アクセス可能なパスの一覧を表示します", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:185-188 (schema)Input schema definition for the tool (empty object since no parameters required).inputSchema: { type: "object", properties: {}, },
- src/index.ts:108-110 (helper)PathValidator helper method that provides the list of allowed paths used by the tool handler.getAllowedPaths(): string[] { return [...this.allowedPaths]; }