{"name":"dev.pages.trymentat/mentat","title":"Mentat","description":"The permission and audit layer for coding agents. Ask what governs a file before editing it, get the team's decisions with their reasons, or a block naming both authors when two decisions disagree.","version":"0.1.0","websiteUrl":"https://trymentat.pages.dev/docs","remotes":[{"type":"streamable-http","url":"https://trymentat.pages.dev/mcp"}],"supportedProtocolVersions":["2025-11-25","2025-06-18","2025-03-26"],"icons":[{"src":"https://trymentat.pages.dev/icon-512.png","sizes":"512x512","mimeType":"image/png"}],"protocolVersion":"2025-11-25","serverInfo":{"name":"mentat","title":"Mentat","version":"0.1.0","description":"Stateless MCP server for a team's engineering decision graph.","homepage":"https://trymentat.pages.dev"},"transport":{"type":"streamable-http","endpoint":"https://trymentat.pages.dev/mcp"},"capabilities":{"tools":{"listChanged":false},"resources":false,"prompts":false},"authentication":{"required":false,"schemes":["bearer"],"description":"Optional. Without a token the server answers from a read-only demo graph. Send `Authorization: Bearer mtk_...` for your own workspace; create one with POST /api/workspaces, no signup."},"instructions":"Mentat is the coherence layer for this team's decisions.\n\nCall `relevant` with a file path before editing a file for the first time in a session, and before proposing an architectural change. You get back the recorded decisions that govern it, ordered most specific first, with the reason behind each one.\n\nIf two active decisions disagree about that file, `relevant` returns a BLOCK instead. When that happens: stop, report both decisions and both authors to the user verbatim, and do not pick a side. Choosing quietly is the exact failure Mentat exists to prevent.\n\nDecisions marked `questioned` rest on an assumption that has broken or gone stale. Treat them as context, not as rules.\n\nStatement types matter. `code_inferable` and `structural` decisions are checkable, so follow them literally. `infrastructure`, `intent_oriented`, and `process` decisions are background: never report a violation of one.\n\nWhen the user corrects you with a general rule rather than a one-off instruction, call `record` with their reason in their own words. Never invent a justification.","tools":[{"name":"relevant","title":"What governs this file","description":"Return the team decisions that govern a file path, already de-conflicted and ordered most-specific-first. Call this before editing a file you have not edited in this session, and before proposing an architectural change. If two active decisions disagree about the file, this returns a BLOCK naming both authors: stop, report the block to the user verbatim, and do not pick a side yourself."},{"name":"record","title":"Record a decision","description":"Record a constraint the user just stated as a team rule. Call this when the user corrects you with a general rule rather than a one-off instruction, and only after they have said it: never infer a rule from code you read. Lands as `proposed` for the user to confirm. Always include their reason if they gave one, and the condition that would have to stay true for the rule to keep making sense."},{"name":"conflicts","title":"List derived conflicts","description":"List contradictions Mentat has derived between decisions, optionally within a scope. Conflicts are always derived from scope overlap plus opposed direction on a shared axis; they cannot be entered by hand. Use this to answer 'do our rules disagree anywhere' without reading a file."},{"name":"resolve","title":"Resolve a conflict","description":"Apply a human's resolution to a derived conflict. `supersede` marks one decision as replacing the other. `except` carves a scoped, expiring hole in one decision and leaves both standing, which is usually what people actually mean. `retire` drops a decision that no longer applies. Only call this when the user has told you which way to go: never choose between two colleagues yourself."},{"name":"assumptions","title":"List assumptions","description":"List the conditions the team's decisions are standing on, with how long since each was verified and how many decisions rest on it. Use this when the user asks why a decision is under review, or to find which premises have quietly expired."},{"name":"break_assumption","title":"Mark an assumption broken","description":"Mark an assumption as no longer true, which questions every decision resting on it across the whole graph at once. Call this when the user says a premise has changed, for example that traffic grew past a threshold a decision assumed. Report the full list of questioned decisions back to them, because that list is the point."},{"name":"compile","title":"Compile AGENTS.md","description":"Generate a scoped, minimal, de-conflicted AGENTS.md for one directory from the decision graph. Use this instead of hand-editing instruction files: past roughly 150 to 200 instructions models follow fewer of them, so a shorter file that only covers the directory in front of you outperforms a long repository-wide one."},{"name":"coherence","title":"Score the decision set","description":"Score how internally coherent the team's decisions are right now, out of 100, with the specific decisions and assumptions costing the most points. Use this when the user asks about the overall health of their rules rather than about one file."},{"name":"watch_assumption","title":"Attach a monitor to an assumption","description":"Point an assumption at a metric so it can break itself instead of waiting for someone to review it. Call this when the user states a premise that is a number a system already tracks, for example replica lag or a queue depth. You supply the query because only the user knows what their metric is called; if they have not named one, ask rather than guessing."},{"name":"check_assumptions","title":"Check monitored assumptions now","description":"Sample every monitored assumption and apply the result, questioning every decision that rests on a premise the numbers say is dead. Normally this runs on a schedule; call it when the user asks whether their premises still hold, or right after an incident. Report the questioned decisions back verbatim: that list is the entire point."},{"name":"enforce","title":"Compile decisions into CI checks","description":"Compile the decisions that can be machine-checked into dependency-cruiser, ESLint, and literal-check configuration, each rule carrying the justification and the author so a failed build explains itself. Only code_inferable and structural decisions are ever compiled; everything else is listed with the reason it was skipped. Use this when the user asks how to actually enforce a rule rather than just state it."},{"name":"amend","title":"Change one field of a decision","description":"Change one field of an existing decision without replacing it, so the decision keeps its id, its author, and its history. Use this when the user narrows a scope, rewords a rule, or softens a mandate, rather than recording a new decision that would duplicate the old one. A reason is required: an edit to a governing rule with no stated why is a decision reversal nobody wrote down. Report the diff back to the user."},{"name":"history","title":"What changed about this decision, and who changed it","description":"Return every amendment ever made to one decision, oldest first, with the author, the reason, and the before and after values. Use this when the user asks why a rule says what it says, when it changed, or who changed it. This is the audit answer: what the rule said when some code shipped, rather than what it says now."},{"name":"queue","title":"Open contradictions as tracked work","description":"List unresolved contradictions as work items with owners, an age, and how many times an agent has been stopped by each, plus the team's coherence metrics. Both authors are owners, in alphabetical order: this never nominates one of them. Use this when the user asks what is outstanding, or how long their disagreements have been sitting."}],"documentation":"https://trymentat.pages.dev/docs","_meta":{"dev.pages.trymentat/openapi":"https://trymentat.pages.dev/openapi.json","dev.pages.trymentat/llms":"https://trymentat.pages.dev/llms.txt","dev.pages.trymentat/stateless":true}}