~ 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
244 lines · 9.5 KB Raw History
{
	"$type": "place.hud.view",
	"method": "app.bsky.actor.getProfile",
	"app": "Bluesky",
	"service": "did:web:api.bsky.app#bsky_appview",
	"description": "A Bluesky account's profile, with its latest posts and the feeds it made (params: { actor: handle or DID })",
	"origins": ["https://cdn.bsky.app", "https://video.bsky.app", "https://video.cdn.bsky.app"],
	"thumbnails": [{ "from": "https://cdn.bsky.app/img/avatar/plain/", "to": "https://cdn.bsky.app/img/avatar_thumbnail/plain/" }],
	"query": {
		"join": [
			{
				"as": "posts",
				"query": "app.bsky.feed.getAuthorFeed",
				"params": { "actor": { "$": "response.did" }, "filter": "posts_no_replies", "limit": 5 },
				"say": { "noun": ["recent post", "recent posts"], "count": "feed" }
			},
			{
				"as": "feeds",
				"query": "app.bsky.feed.getActorFeeds",
				"params": { "actor": { "$": "response.did" }, "limit": 10 },
				"say": { "noun": ["feed", "feeds"], "count": "feeds" }
			}
		],
		"summary": {
			"noun": ["profile", "profiles"],
			"label": { "$": ["response.displayName", "response.handle"] },
			"detail": { "count": { "$": "response.postsCount" }, "noun": ["post", "posts"] }
		},
		"layout": {
			"component": "Stack",
			"props": { "gap": "md" },
			"children": [
				{
					"component": "Profile",
					"props": {
						"name": { "$": ["response.displayName", "response.handle"] },
						"handle": { "$": "response.handle" },
						"avatar": { "$": "response.avatar" },
						"banner": { "$": "response.banner" },
						"description": { "$": "response.description" }
					}
				},
				{
					"component": "Row",
					"props": { "gap": "md", "align": "center" },
					"children": [
						{
							"component": "Row",
							"props": { "gap": "xs", "align": "center" },
							"children": [
								{ "component": "Text", "props": { "value": { "$": "response.followersCount" }, "style": "strong" } },
								{ "component": "Text", "props": { "value": "followers", "style": "muted" } }
							]
						},
						{
							"component": "Row",
							"props": { "gap": "xs", "align": "center" },
							"children": [
								{ "component": "Text", "props": { "value": { "$": "response.followsCount" }, "style": "strong" } },
								{ "component": "Text", "props": { "value": "following", "style": "muted" } }
							]
						},
						{
							"component": "Row",
							"props": { "gap": "xs", "align": "center" },
							"children": [
								{ "component": "Text", "props": { "value": { "$": "response.postsCount" }, "style": "strong" } },
								{ "component": "Text", "props": { "value": "posts", "style": "muted" } }
							]
						}
					]
				},
				{
					"component": "List",
					"props": {
						"items": { "$": "joins.posts.feed" },
						"title": "Recent posts",
						"empty": "No posts yet",
						"style": "rows",
						"open": { "query": "app.bsky.feed.getPostThread", "params": { "uri": { "$": "post.uri" } } }
					},
					"children": [
						{
							"component": "FeedContext",
							"props": { "item": { "$": "." }, "open": { "query": "app.bsky.feed.getPostThread", "params": { "uri": { "$": "post.uri" } } } },
							"children": [
								{
									"component": "Row",
									"props": { "gap": "sm", "align": "start" },
									"children": [
										{ "component": "Image", "props": { "src": { "$": "post.author.avatar" }, "alt": { "$": "post.author.handle" }, "size": "face" } },
										{
											"component": "Stack",
											"props": { "gap": "sm" },
											"children": [
												{
													"component": "Row",
													"props": { "gap": "xs", "align": "center", "wrap": "cut" },
													"children": [
														{
															"component": "Link",
															"props": { "href": { "$": "post.author.did" }, "label": { "$": ["post.author.displayName", "post.author.handle"] } }
														},
														{ "component": "Text", "props": { "value": { "$": "post.author.handle" }, "style": "muted", "prefix": "@" } },
														{ "component": "Text", "props": { "value": "·", "style": "muted" } },
														{ "component": "Time", "props": { "value": { "$": "post.record.createdAt" } } }
													]
												},
												{ "component": "RichText", "props": { "value": { "$": "post.record.text" }, "format": "facets", "facets": { "$": "post.record.facets" } } },
												{ "component": "Embed", "props": { "value": { "$": "post.embed" }, "did": { "$": "post.author.did" }, "uri": { "$": "post.uri" } } },
												{
													"component": "Row",
													"props": { "gap": "lg", "align": "center" },
													"children": [
														{ "component": "Stat", "props": { "value": { "$": "post.replyCount" }, "icon": "reply", "label": "replies" } },
														{
															"component": "Action",
															"props": {
																"label": "Repost",
																"icon": "repost",
																"count": { "$": "post.repostCount" },
																"done": "Reposted",
																"create": { "collection": "app.bsky.feed.repost", "record": { "subject": { "$strongRef": "post" }, "createdAt": { "$now": true } } },
																"existing": { "$": "post.viewer.repost" }
															}
														},
														{
															"component": "Action",
															"props": {
																"label": "Like",
																"icon": "heart",
																"count": { "$": "post.likeCount" },
																"done": "Liked",
																"create": { "collection": "app.bsky.feed.like", "record": { "subject": { "$strongRef": "post" }, "createdAt": { "$now": true } } },
																"existing": { "$": "post.viewer.like" }
															}
														}
													]
												}
											]
										}
									]
								}
							]
						},
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "start" },
							"children": [
								{ "component": "Image", "props": { "src": { "$": "post.author.avatar" }, "alt": { "$": "post.author.handle" }, "size": "face" } },
								{
									"component": "Stack",
									"props": { "gap": "sm" },
									"children": [
										{
											"component": "Row",
											"props": { "gap": "xs", "align": "center", "wrap": "cut" },
											"children": [
												{
													"component": "Link",
													"props": { "href": { "$": "post.author.did" }, "label": { "$": ["post.author.displayName", "post.author.handle"] } }
												},
												{ "component": "Text", "props": { "value": { "$": "post.author.handle" }, "style": "muted", "prefix": "@" } },
												{ "component": "Text", "props": { "value": "·", "style": "muted" } },
												{ "component": "Time", "props": { "value": { "$": "post.record.createdAt" } } }
											]
										},
										{
											"component": "FeedContext",
											"props": {
												"item": { "$": "." },
												"part": "replyTo",
												"open": { "query": "app.bsky.feed.getPostThread", "params": { "uri": { "$": "post.uri" } } }
											}
										},
										{ "component": "RichText", "props": { "value": { "$": "post.record.text" }, "format": "facets", "facets": { "$": "post.record.facets" } } },
										{ "component": "Embed", "props": { "value": { "$": "post.embed" }, "did": { "$": "post.author.did" }, "uri": { "$": "post.uri" } } },
										{
											"component": "Row",
											"props": { "gap": "lg", "align": "center" },
											"children": [
												{ "component": "Stat", "props": { "value": { "$": "post.replyCount" }, "icon": "reply", "label": "replies" } },
												{
													"component": "Action",
													"props": {
														"label": "Repost",
														"icon": "repost",
														"count": { "$": "post.repostCount" },
														"done": "Reposted",
														"create": { "collection": "app.bsky.feed.repost", "record": { "subject": { "$strongRef": "post" }, "createdAt": { "$now": true } } },
														"existing": { "$": "post.viewer.repost" }
													}
												},
												{
													"component": "Action",
													"props": {
														"label": "Like",
														"icon": "heart",
														"count": { "$": "post.likeCount" },
														"done": "Liked",
														"create": { "collection": "app.bsky.feed.like", "record": { "subject": { "$strongRef": "post" }, "createdAt": { "$now": true } } },
														"existing": { "$": "post.viewer.like" }
													}
												}
											]
										}
									]
								}
							]
						}
					]
				},
				{
					"component": "Link",
					"props": {
						"label": "All posts",
						"open": { "query": "app.bsky.feed.getAuthorFeed", "params": { "actor": { "$": "response.did" }, "filter": "posts_no_replies" } }
					}
				},
				{
					"component": "List",
					"props": {
						"items": { "$": "joins.feeds.feeds" },
						"title": "Feeds",
						"style": "rows",
						"open": { "query": "app.bsky.feed.getFeed", "params": { "feed": { "$": "uri" } } }
					},
					"children": [
						{
							"component": "Row",
							"props": { "gap": "sm", "align": "center" },
							"children": [
								{ "component": "Image", "props": { "src": { "$": "avatar" }, "alt": { "$": "displayName" }, "size": "avatar" } },
								{ "component": "Text", "props": { "value": { "$": "displayName" }, "style": "strong" } },
								{ "component": "Stat", "props": { "value": { "$": "likeCount" }, "icon": "heart", "label": "likes" } }
							]
						},
						{ "component": "RichText", "props": { "value": { "$": "description" }, "format": "facets", "facets": { "$": "descriptionFacets" }, "style": "muted", "clamp": 2 } }
					]
				}
			]
		}
	}
}