~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0
114 lines · 3.0 KB Raw History
{
	"lexicon": 1,
	"id": "place.hud.getLogs",
	"description": "The lines this HUD server logged, for its operators.",
	"defs": {
		"main": {
			"type": "query",
			"description": "The lines this server logged, oldest first: all of one request's by its trace, or the last of a message, a level or a duration. Requires auth as one of the accounts the server names as its operators (HUD_OPERATOR_DIDS): the workspace's web session (its cookie) or a HUD access token as Bearer. Kept while HUD_LOGS is on, for 30 days at most. Each read is itself logged, with who asked and for what.",
			"parameters": {
				"type": "params",
				"properties": {
					"trace": {
						"type": "string",
						"maxLength": 64,
						"description": "All of one request's lines, by the trace ID each carries and its answer's x-trace-id names."
					},
					"message": {
						"type": "string",
						"maxLength": 200,
						"description": "Only lines with this message.",
						"knownValues": [
							"request",
							"outgoing",
							"mcp tool",
							"mcp tool failed",
							"mcp error",
							"logs read",
							"summary: requests",
							"summary: outgoing",
							"summary: cache"
						]
					},
					"level": {
						"type": "string",
						"maxLength": 16,
						"description": "Only lines at this level or above.",
						"knownValues": [
							"error",
							"warn",
							"info",
							"debug",
							"trace"
						]
					},
					"minMs": {
						"type": "integer",
						"minimum": 0,
						"description": "Only lines that took this many milliseconds or more."
					},
					"limit": {
						"type": "integer",
						"minimum": 1,
						"maximum": 500,
						"description": "How many, the last of those asked for. Unless given, 500 for a trace, so a request's lines come whole, and 100 otherwise."
					}
				}
			},
			"output": {
				"encoding": "application/json",
				"schema": {
					"type": "object",
					"required": [
						"lines"
					],
					"properties": {
						"lines": {
							"type": "array",
							"items": {
								"type": "ref",
								"ref": "#line"
							},
							"description": "The lines asked for, oldest first."
						}
					}
				}
			},
			"errors": [
				{
					"name": "AuthRequired",
					"description": "No live web session or HUD access token: sign in."
				},
				{
					"name": "Forbidden",
					"description": "The account is not one of this server's operators."
				},
				{
					"name": "NotFound",
					"description": "This server keeps no lines (HUD_LOGS is off)."
				},
				{
					"name": "InvalidRequest",
					"description": "None of trace, message, level and minMs was given."
				},
				{
					"name": "LogsUnreadable",
					"description": "The server could not read the lines it keeps."
				}
			]
		},
		"line": {
			"type": "object",
			"description": "One line, as logged.",
			"required": [
				"line"
			],
			"properties": {
				"line": {
					"type": "unknown",
					"description": "The JSON line, as written to the log: its timestamp, level, message, target, trace_id and the fields the event had."
				}
			}
		}
	}
}