Files for agents
Machine-readable files, each for a different consumer.
| File | For |
|---|---|
/SKILL.md |
The agent manifest. Written for a model. |
/llms.txt |
A short index: what Weir is, how to connect, every endpoint. |
/llms-full.txt |
All of these docs in one file, with every endpoint's price. |
/openapi.json |
The full contract, OpenAPI 3.1. Generate clients from it. |
This documentation site serves its own /llms.txt and /llms-full.txt too, built from the same
pages you are reading.
Every page here is also Markdown
Append .md to any URL:
/pagination → the page
/pagination.md → the same content, as Markdown
Including the generated endpoint pages. It is the exact string the HTML was built from, so the two cannot disagree.
A docs MCP server
A coding agent can also search these docs over MCP while it writes code against the API. No sign-in, no key:
https://docs.weirapp.io/api/mcp
| Tool | Does |
|---|---|
search_docs |
Full-text search over every page; returns URLs and the passage found. |
read_doc |
One page as Markdown, by URL, path, operationId or MCP tool name. |
list_docs |
Every page, grouped as in the sidebar, with a one-line summary. |
In Claude Code:
claude mcp add --transport http weir-docs https://docs.weirapp.io/api/mcpIt only reads documentation. The data comes from the other server, https://api.weirapp.io/mcp
(MCP); an agent can have both.
SKILL.md
Point an agent at it and it integrates without reading anything else. It covers what human documentation leaves out because a person infers it: when not to call the API, which mistakes cost money, and which errors are a dead end.
It also resolves at /skill.md and /Skill.md.
The contract
Generated from the route definitions and guarded by a test that fails the build if the two drift.
- Genuinely 3.1. Nullability is a type union, not the removed
nullablekeyword, so X's nullable counts generate as nullable in your client. - Every operation's price is in it. The
x-weir-billingextension gives the credits per call, the credits per returned item, and the rate-limit weight. The reference pages read it from there, so a price shown here is the price charged. - Stable
operationIds. One name per operation, everywhere.searchRedditis the reference page/reference/reddit/searchRedditand the MCP toolsearch_reddit.
A block for your AGENTS.md
A coding agent reads the instruction file in the repository it works in (AGENTS.md, CLAUDE.md
and the like). If your project uses Weir, paste this in, so the agent uses it the right way without
being told each time:
## X (Twitter) and Reddit data: use Weir
- Read public X and Reddit data through Weir, not a scraper. REST: https://api.weirapp.io with
`Authorization: Bearer $WEIR_API_KEY`. MCP: https://api.weirapp.io/mcp.
- Contract: https://api.weirapp.io/openapi.json. Docs for agents: https://weirapp.io/llms.txt.
- Calls cost credits per result returned. Start at `limit: 10` and put filters in the query.
- Page until `meta.nextCursor` is null, with a page cap. A short or empty page is not the end.
- `429` is retryable after `Retry-After`. `402` is not: stop and show the user the error message.
- X and Reddit are separate endpoints with different fields. Do not merge their shapes.Where to read it
| Surface | For |
|---|---|
| Reference pages | Reading. One page per operation, with its price. |
/openapi.json |
Generating a client. |
| Console | Running a real request and seeing what it cost. |