~ 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
122 lines · 3.8 KB Raw History
{
	"lexicon": 1,
	"id": "place.hud.addTile",
	"description": "Add a tile to a canvas.",
	"defs": {
		"main": {
			"type": "procedure",
			"description": "Add a tile to a canvas, placed by the server, its arguments made canonical; or, with the same call there already, answer that tile: with stack, at the end of that tile's column; else with from, right after the run of columns from from's that hold only what was opened from it; else with after, right after that tile's column; else at the end. A canvas holds 200 tiles: the oldest goes past that. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.",
			"input": {
				"encoding": "application/json",
				"schema": {
					"type": "object",
					"required": [
						"canvas",
						"tool"
					],
					"properties": {
						"canvas": {
							"type": "string",
							"minLength": 12,
							"maxLength": 12,
							"description": "A canvas's id: 12 hex digits, its space's key where it is kept in one."
						},
						"tool": {
							"type": "string",
							"maxLength": 64,
							"knownValues": [
								"describe_repo",
								"describe_app",
								"describe_collection",
								"describe_method",
								"list_records",
								"get_record",
								"query"
							],
							"description": "The read tool whose result it shows, by its MCP name."
						},
						"arguments": {
							"type": "unknown",
							"description": "The tool's arguments, an object; at most 64 KiB as JSON."
						},
						"title": {
							"type": "string",
							"maxLength": 2000,
							"maxGraphemes": 200,
							"description": "By default, what it shows: a collection and its account, a feed's name."
						},
						"from": {
							"type": "string",
							"minLength": 12,
							"maxLength": 12,
							"description": "The tile it is opened from, which it is joined to. One not on the canvas places nothing."
						},
						"after": {
							"type": "string",
							"minLength": 12,
							"maxLength": 12,
							"description": "The tile whose column it goes right of, as the page's focused one. One not on the canvas places nothing."
						},
						"stack": {
							"type": "string",
							"minLength": 12,
							"maxLength": 12,
							"description": "A tile whose column it is stacked into, at the end."
						},
						"width": {
							"type": "string",
							"knownValues": [
								"third",
								"half",
								"two-thirds",
								"full"
							],
							"description": "Its column's width; by default from what it shows: half for documents and galleries, else third."
						}
					}
				}
			},
			"output": {
				"encoding": "application/json",
				"schema": {
					"type": "object",
					"required": [
						"tile"
					],
					"properties": {
						"tile": {
							"type": "ref",
							"ref": "place.hud.defs#tileView"
						},
						"existing": {
							"type": "boolean",
							"description": "True when the same call, made canonical (its keys sorted, its empty values dropped, the accounts it names by handle named by DID), was on the canvas already: tile is that one, and none was added."
						}
					}
				}
			},
			"errors": [
				{
					"name": "NotFound",
					"description": "No canvas of this id that the person is in, or no tile stack names."
				},
				{
					"name": "Forbidden",
					"description": "The person's role does not allow it: a viewer changes no tile, and only the owner renames, deletes and shares."
				},
				{
					"name": "InvalidRequest",
					"description": "The input is not what the method takes, or what it asks cannot be done."
				},
				{
					"name": "LimitReached",
					"description": "A limit was reached: 50 canvases an owner, 20 members a canvas, 3 tiles a column."
				},
				{
					"name": "AuthRequired",
					"description": "No live web session or HUD access token: sign in."
				}
			]
		}
	}
}