list_resources
View all deployed applications, services, and databases in your Coolify self-hosted PaaS instance to monitor and manage your infrastructure.
Instructions
List all resources (applications, services, databases)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers.ts:491-492 (handler)The execution logic for the 'list_resources' tool. Calls the CoolifyClient GET /resources endpoint to retrieve all resources (applications, services, databases).case 'list_resources': return client.get('/resources');
- src/tools/definitions.ts:1175-1178 (schema)Schema and metadata definition for the list_resources tool, including empty input schema (no parameters). Used by MCP to validate calls and list tools.name: 'list_resources', description: 'List all resources (applications, services, databases)', inputSchema: { type: 'object', properties: {}, required: [] } },
- src/index.ts:36-38 (registration)Registers the MCP ListTools handler, which exposes the list_resources tool (via getToolDefinitions()) to MCP clients.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)Registers the MCP CallTool handler, which dispatches tool calls (including list_resources) to the handleTool function after validation.this.server.setRequestHandler(CallToolRequestSchema, async (request) => { if (!this.client) { throw new McpError(ErrorCode.InternalError, 'Client not initialized'); } const { name, arguments: args } = request.params; // Block write operations in read-only mode if (isReadOnlyMode() && !READ_ONLY_TOOLS.includes(name)) { throw new McpError( ErrorCode.InvalidRequest, `Operation '${name}' is not allowed in read-only mode. Set COOLIFY_READONLY=false to enable write operations.` ); } try { const result = await handleTool(this.client, name, args || {}); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { if (error instanceof McpError) throw error; const message = error instanceof Error ? error.message : 'Unknown error'; throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${message}`); } });
- src/tools/definitions.ts:37-37 (helper)Includes 'list_resources' in the READ_ONLY_TOOLS array, ensuring it is available even in read-only mode.'list_resources',