Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions site/src/data/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@
{
"name": "ha_get_logs",
"title": "Get Logs",
"description": "Get Home Assistant logs from various sources.\n\n**Sources:**\n- \"logbook\" (default): Entity state change history with pagination\n- \"system\": Structured system log entries (errors, warnings) via system_log/list\n- \"error_log\": Raw log text (home-assistant.log on container/pip installs; HA Core's journald stream on Supervisor-backed installs)\n- \"supervisor\": Add-on container logs (requires slug = add-on slug)\n- \"system_service\": HA-Supervisor-managed system service logs (requires\n slug ∈ {supervisor, host, core, dns, audio, cli, multicast, observer})\n- \"logger\": Effective log level per integration via logger/log_info (confirms logger.set_level changes took effect)\n\n**Prefer source='system' for triage.** It returns HA's own deduplicated\nsystem_log entries with counts, first_occurred and full tracebacks; of\nthose only the tracebacks are unrecoverable from the structured\nerror_log summary β€” they are present in the raw text, so structured=False\ngets them back. Its counts also run\nsince each error first occurred, while structured error_log counts only\nwhat is inside the fetched window (reported as window_start/window_end;\nSupervisor-backed installs read a capped journald slice). Use error_log\nwith structured=True for entries below system_log's WARNING+ ~50-entry\ncap, or for the per-component rollup.\n\n**Shared params:** limit, search (keyword filter on entries/lines; matches integration domain for source='logger')\n**Order:** order='newest' (default) returns most-recent first; order='oldest' returns chronological-first. Applies to all time-ordered sources (logbook, system, error_log, supervisor, system_service); ignored for source='logger' and for error_log with structured=True. For raw-text sources (error_log, supervisor, system_service) it sets the read direction of the most-recent window.\n**Logbook params:** hours_back, entity_id, end_time, offset, compact (default True β€” strips attribute dicts to save context)\n**System/error_log params:** level (ERROR, WARNING, INFO, DEBUG, CRITICAL)\n**error_log params:** structured, top_n. In structured mode `search`\n matches the message and logger name only, whereas on the raw path it\n matches the whole line; `limit`/`order` do not apply, and issues are\n ranked by count, then severity, then recency.\n**Supervisor params:** slug = add-on slug, e.g. \"core_mosquitto\" (use\n ha_get_app() to list installed slugs)\n**System-service params:** slug = service name. The slug \"supervisor\"\n here means the Supervisor service's own logs, NOT an add-on with\n that name β€” the source param disambiguates.",
"description": "Get Home Assistant logs from various sources.\n\n**Sources:**\n- \"logbook\" (default): Entity state change history with pagination\n- \"system\": Structured system log entries (errors, warnings) via system_log/list\n- \"error_log\": Raw log text (home-assistant.log on container/pip installs; HA Core's journald stream on Supervisor-backed installs)\n- \"supervisor\": Add-on container logs (requires slug = add-on slug)\n- \"system_service\": HA-Supervisor-managed system service logs (requires\n slug ∈ {supervisor, host, core, dns, audio, cli, multicast, observer})\n- \"logger\": Effective log level per integration via logger/log_info (confirms logger.set_level changes took effect)\n\n**Prefer source='system' for triage.** It returns HA's own deduplicated\nsystem_log entries with counts, first_occurred and full tracebacks; of\nthose only the tracebacks are unrecoverable from the structured\nerror_log summary β€” they are present in the raw text, so structured=False\ngets them back. Its counts also run\nsince each error first occurred, while structured error_log counts only\nwhat is inside the fetched window (reported as window_start/window_end;\nevery install now reads a capped window). Use error_log\nwith structured=True for entries below system_log's WARNING+ ~50-entry\ncap, or for the per-component rollup.\n\n**Shared params:** limit, search (keyword filter on entries/lines; matches integration domain for source='logger')\n**Order:** order='newest' (default) returns most-recent first; order='oldest' returns chronological-first. Applies to all time-ordered sources (logbook, system, error_log, supervisor, system_service); ignored for source='logger' and for error_log with structured=True. For raw-text sources (error_log, supervisor, system_service) it sets the read direction of the most-recent window.\n**Logbook params:** hours_back, entity_id, end_time, compact (default True β€” strips attribute dicts to save context)\n**Pagination (logbook + error_log):** offset pages deeper; ignored for the\n other sources. Logbook responses carry has_more plus a\n pagination_hint. On error_log, offset counts raw log lines back from\n the newest entry (journald entries on Supervisor-backed installs),\n both modes read a bounded window per call β€” so `level`/`search`\n filter and `limit` slice within that window only, and window_lines\n reports the size actually requested β€” and the response carries\n has_more with a next_offset to pass back while it stays true.\n**System/error_log params:** level (ERROR, WARNING, INFO, DEBUG, CRITICAL)\n**error_log params:** structured, top_n. In structured mode `search`\n matches the message and logger name only, whereas on the raw path it\n matches the whole line; `limit`/`order` do not apply, issues are\n ranked by count, then severity, then recency, and the summary covers\n a fixed deep window rather than the caller's limit.\n**Supervisor params:** slug = add-on slug, e.g. \"core_mosquitto\" (use\n ha_get_app() to list installed slugs)\n**System-service params:** slug = service name. The slug \"supervisor\"\n here means the Supervisor service's own logs, NOT an add-on with\n that name β€” the source param disambiguates.",
"inputSchema": {
"properties": {
"source": {
Expand Down Expand Up @@ -2132,7 +2132,7 @@
"default": null
},
"offset": {
"type": "Annotated[int, Field(ge=0)]",
"type": "Annotated[int, Field(ge=0, description=\"Page deeper into source='logbook' and source='error_log' (ignored for other sources). On error_log it counts raw log lines back from the newest entry; pass the response's 'next_offset' to continue while 'has_more' is true.\")]",
"default": 0
},
"compact": {
Expand Down Expand Up @@ -2165,7 +2165,7 @@
"tags": [
"History & Statistics"
],
"source_file": "tools_utility.py"
"source_file": "tools_logs.py"
},
{
"name": "ha_get_integration",
Expand Down
Loading
Loading