diff --git a/src/mcp_synology_container/modules/containers.py b/src/mcp_synology_container/modules/containers.py index 6e7b8e6..48c6eaf 100644 --- a/src/mcp_synology_container/modules/containers.py +++ b/src/mcp_synology_container/modules/containers.py @@ -108,6 +108,29 @@ def register_containers(mcp: FastMCP, config: AppConfig, client: DsmClient) -> N return "\n".join(lines).rstrip() + @mcp.tool() + async def debug_container_response(container_name: str) -> str: + """TEMPORARY DEBUG TOOL — returns raw SYNO.Docker.Container/get response as JSON. + + Used to inspect the actual DSM response structure so that + get_container_status can be fixed to read the correct fields. + Remove once the real fix is in place. + + Args: + container_name: Name of the container to inspect. + """ + clean_name = _strip_hash_prefix(container_name) + try: + data = await client.request( + "SYNO.Docker.Container", + "get", + params={"name": clean_name}, + ) + except Exception as e: + return f"Error calling SYNO.Docker.Container/get for '{clean_name}': {e}" + + return json.dumps(data, indent=2, default=str) + @mcp.tool() async def get_container_status(container_name: str) -> str: """Get detailed status, uptime, and resource usage of a container.