get_server_domains
Retrieve configured domains for a specific server using its UUID to manage web application routing and connectivity.
Instructions
Get domains configured on a server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Server UUID |
Implementation Reference
- src/tools/handlers.ts:87-89 (handler)Handler implementation for the get_server_domains tool. Validates the 'uuid' parameter and fetches server domains via the Coolify API.case 'get_server_domains': requireParam(args, 'uuid'); return client.get(`/servers/${args.uuid}/domains`);
- src/tools/definitions.ts:193-201 (schema)Schema definition for the get_server_domains tool, defining the required 'uuid' input parameter.{ name: 'get_server_domains', description: 'Get domains configured on a server', inputSchema: { type: 'object', properties: { uuid: { type: 'string', description: 'Server UUID' } }, required: ['uuid'] } },
- src/index.ts:36-38 (registration)Registration of tool list handler using getToolDefinitions(), which includes the get_server_domains tool schema.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
- src/index.ts:41-67 (registration)Registration of tool call handler using handleTool, which dispatches to the specific get_server_domains case.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:15-15 (helper)Inclusion in READ_ONLY_TOOLS array, marking it as a read-only operation.'get_server_domains',