Abilities

Get llms.txt

lh-ai-legibility/get-llms-txt Read-only Idempotent

Returns this site's llms.txt document with its sections, the text /llms.txt serves and a check of every section link. It gives its status (none, draft, publish or another status), summary (the blockquote under the site name), details (free-form paragraphs and lists) and sections (each a title and a list of links with optional descriptions), plus llms_txt, the text /llms.txt serves or will serve once the document is published, and a link_check of every section link. A link is ok when it is a published single post on this site that can be served as Markdown; not_found, not_published and not_eligible (password-protected, private or opted out, so left out of llms-full.txt) are problems to fix; unchecked means it was not tested, because it is not a single post on this site and check_links was not all. Blocks the document does not support are listed in unsupported_blocks; they are ignored in llms.txt. Requires manage_options. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
check_linksstringNo"internal"internal (the default) checks links to single posts on this site from the database. all also requests every other link over HTTP (a HEAD request, up to 25 links, 5 seconds each). One of: internal, all.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Update llms.txt

lh-ai-legibility/update-llms-txt Idempotent

Replaces the whole content of this site's unpublished llms.txt document and returns the text it produces with a link check. It takes sections (required: each a title and links, each link a url, label and optional one-line description), optional details (paragraphs and lists placed after the summary and before the sections) and an optional summary (the blockquote under the site name; omit it to keep the current one). Plain text throughout: the block markup is built here. Only works while the document is not published: if there is no document a draft is created, and a draft is updated in place. A published document is refused, with the built content_blocks returned so the change can be proposed for review with lh-agora/propose-changes on document_id instead. Never publishes; a person publishes the document in wp-admin. With dry_run true nothing is saved. Every result includes llms_txt, the text the document produces, and a link_check as in get-llms-txt; check it before asking for the document to be published. Requires manage_options. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
summarystringNoThe one- or two-sentence description of the site shown as a blockquote. Omit to keep the current summary.
detailsarray of objectNoParagraphs ({type: paragraph, text}) and lists ({type: list, items}) shown after the summary and before the sections, in order. Omit or pass [] for none.
sectionsarray of objectYesThe link sections, in order. A section titled Optional marks links an agent may skip, per the llms.txt specification.
dry_runbooleanNofalseBuild and check the document without saving it. Defaults to false.
check_linksstringNo"internal"internal (the default) checks links to single posts on this site from the database. all also requests every other link over HTTP (a HEAD request, up to 25 links, 5 seconds each). One of: internal, all.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.