{"slug": "making-valibot-easier-for-coding-agents-to-use", "title": "Making Valibot easier for coding agents to use", "summary": "Valibot, an open-source schema validation library, has reworked its documentation to be more accessible to coding agents, introducing a free MCP server at https://valibot.dev/mcp, publishing an agent skill, and generating Markdown versions of pages. The changes aim to reduce context costs and improve agent efficiency, with 28 API reference files corrected and five orphaned pages identified.", "body_md": "We assume a lot of people use coding agents when they're building with Valibot, so we spent the last few weeks reworking the documentation for them.\n\nAgents already write most Valibot schemas correctly from their training data. The problems we found were around function names that no longer matched, pages that nothing linked to, and how much context a single page costs to read. A lot of our work went into those.\n\nWe now run an MCP server\n\nIt's at `https://valibot.dev/mcp`\n\n, free, needs no authentication, and gives your agent three tools:\n\n`search_docs`\n\nsearches the guides, API reference and blog and returns matching pages`get_doc`\n\nreads a specific page and returns it as Markdown`list_docs`\n\nreturns all available documentation grouped by area and category\n\nAdd it to Claude Code with this:\n\n```\nclaude mcp add --transport http valibot https://valibot.dev/mcp\n```\n\nFor Cursor and other tools that use a JSON configuration file, add this entry:\n\n```\n{\n  \"mcpServers\": {\n    \"valibot\": {\n      \"url\": \"https://valibot.dev/mcp\"\n    }\n  }\n}\n```\n\nYour agent makes one tool call instead of several requests. When it needs a specific page, it asks for that page and gets it, instead of pulling three unrelated ones first.\n\nAgents can find the skill now\n\nThe skill loads the current API and the patterns we recommend at the start of the session, so the code your agent writes follows the examples in our guides. We think it's the most useful thing here for most people.\n\nIt lives in `open-circle/agent-skills`\n\n, and until recently that was the only place it lived. Nothing on valibot.dev served it or linked to it, so you had to know the repo existed to point your agent at it. The site now publishes it at `/.well-known/agent-skills/valibot/SKILL.md`\n\nand lists it in a discovery index, so an agent looking for one can find it without being told.\n\nInstalling is still one command.\n\n```\nnpx skills add open-circle/agent-skills --skill valibot\n```\n\nThe Markdown is generated from the page now\n\nWe were already publishing a `.md`\n\nfile for every page, but it was a copy of the source file, and our source files have components in them. Where the page showed a full type signature or a list of related links, the `.md`\n\nfile just had the tag that produces them, so an agent reading it got less than you would. Now the Markdown is generated the way the page is, with those components turned into content.\n\nThat's worth having because of what an HTML page carries. When your agent fetches one it gets the navigation, the scripts and the styling along with it, and pays for all of that in context without using any of it. The Markdown version has the content and none of the rest, so your agent can read several pages for what one used to cost.\n\nWe also added an `X-Markdown-Tokens`\n\nheader to every Markdown response, so a tool can check what a page costs before loading it. API pages keep their full type signatures, and the links between pages point at Markdown, so an agent following a reference from one page to another never has to switch formats.\n\nEvery page now points to llms.txt\n\nWe'd been publishing `llms.txt`\n\nfor a while, and nothing on the site pointed at it, so an agent had to already know it was there. Every Markdown page now links back to it and to its own HTML page, and the file opens with a summary saying what's in it and where the rest of the files are.\n\nWe publish a few other shapes as well, since one file doesn't suit every tool. `llms-full.txt`\n\nis the entire documentation in a single file. For something narrower, `llms-guides.txt`\n\ncovers the guides, `llms-api.txt`\n\nthe API reference, and `llms-blog.txt`\n\nthe blog.\n\nThe API reference now matches the library\n\nThe API reference is the first place an agent looks, so we checked it against the source. We corrected 28 files, covering function names that no longer matched, invalid links and outdated menu entries.\n\nWe also found five pages that nothing linked to. `ltValue`\n\n, `LastTupleItem`\n\n, `Reference`\n\n, `VariantOption`\n\nand `VariantOptionAsync`\n\nwere all written and published, but an agent working through the menu had no way of knowing they existed. We've listed them now. Ask an agent about `VariantOption`\n\ntoday and it reads the page instead of guessing.\n\nThe whole site is static now\n\nNone of this helps much if the pages are slow, so every page is generated ahead of time and served as a file. That's more than 800 pre-rendered pages, so every page an agent asks for is already built and comes back in around 80 ms from the edge cache.\n\nThanks to the [ZanReal](https://zanreal.com/) team for making that possible. They wrote about the [migration](https://zanreal.com/case-studies/valibot-formisch-static-docs) if you want the detail.\n\nThe API design helps too\n\nWe think a lot of this works because of how Valibot is built, which is the part we didn't have to change.\n\nValibot is made of schemas, actions and methods, and all three are plain objects. There's no class hierarchy to follow and no inherited methods to discover. Once a model understands how a schema and an action fit together, it can apply that same shape across the whole API. That's one pattern to learn instead of one per data type.\n\nThe skill, the MCP server, the LLMs.txt files and the Markdown versions are all documented on the [coding agents page](/guides/coding-agents/). [Formisch](https://formisch.dev/), our form library, has the same setup if you're using it.", "url": "https://wpnews.pro/news/making-valibot-easier-for-coding-agents-to-use", "canonical_source": "https://valibot.dev/blog/making-valibot-easier-for-coding-agents/", "published_at": "2026-08-11 00:00:00+00:00", "updated_at": "2026-08-29 20:18:04.675602+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Valibot", "Claude Code", "Cursor", "MCP"], "alternates": {"html": "https://wpnews.pro/news/making-valibot-easier-for-coding-agents-to-use", "markdown": "https://wpnews.pro/news/making-valibot-easier-for-coding-agents-to-use.md", "text": "https://wpnews.pro/news/making-valibot-easier-for-coding-agents-to-use.txt", "jsonld": "https://wpnews.pro/news/making-valibot-easier-for-coding-agents-to-use.jsonld"}}