logging_get_config
Retrieve the logging configuration for your account in a specified region. Use this to view current settings and ensure compliance.
Instructions
Get logging configuration for the account
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "logging_get_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No |
Implementation Reference
- src/tools/observability/index.ts:15-17 (handler)The handler for the 'logging_get_config' tool. It performs a GET request to the IBM Cloud Logging API endpoint using the region from the config or the optional 'region' parameter, wrapped in safeTool for error handling.
server.tool("logging_get_config", "Get logging configuration for the account", { region: z.string().optional(), }, async (p) => safeTool(() => client.get(`${IBM_ENDPOINTS.LOGGING(p.region||r)}/config`))); - The input schema for 'logging_get_config': an optional 'region' parameter validated with z.string().optional().
region: z.string().optional(), - src/tools/observability/index.ts:15-15 (registration)Registration of the 'logging_get_config' tool via server.tool() in the registerObservabilityTools function.
server.tool("logging_get_config", "Get logging configuration for the account", { - src/server.ts:95-96 (registration)The tool is registered by calling registerObservabilityTools(server, client, config) in the main server creation function.
registerObservabilityTools(server, client, config); console.error(` ✓ Observability (5 tools)`); - src/lib/utils.ts:70-77 (helper)The safeTool helper wraps the handler, catching any errors and returning proper MCP success/error responses.
export async function safeTool<T>(fn: () => Promise<T>): Promise<ReturnType<typeof successContent> | ReturnType<typeof errorContent>> { try { const result = await fn(); return successContent(result); } catch (error) { return errorContent(error); } }