{"name":"BlockSmith","description":"Design-system governance for agents: read a system's rules, check code against it, capture a system from any site, and stage changes for a human to approve.","origin":"https://blocksmithv1.vercel.app","protocol":{"name":"WebMCP","api":"document.modelContext.registerTool","spec":"https://github.com/webmachinelearning/webmcp","limits":{"toolName":30,"paramName":30,"paramDescription":150,"toolDescription":500,"output":1500}},"surfaces":[{"page":"https://blocksmithv1.vercel.app/wiki?doc=<design system ref>","description":"Every design system page. Tools are bound to the document on screen; switching systems re-registers them.","tools":["get_governance_rules","list_components","check_capability","list_presets","capture_site_design","export_skill","check_governance","fix_violations","explain_violation","check_component","figma_token_drift","audit_page_styles","audit_site","propose_component","propose_design_change","get_current_context"]},{"page":"https://blocksmithv1.vercel.app/dashboard","description":"The signed-in home. Read-only tools against the default system, so an agent can start work before a page is chosen.","tools":["get_governance_rules","list_components","check_capability","list_presets","capture_site_design","export_skill","check_governance","fix_violations","explain_violation","check_component","figma_token_drift","audit_page_styles","audit_site"]},{"page":"any website","description":"Bookmarklet or the BlockSmith extension runs /webmcp/blocksmith.js on the open site and registers these there.","script":"https://blocksmithv1.vercel.app/webmcp/blocksmith.js","tools":["blocksmith_capture_this_site","blocksmith_audit_this_page","blocksmith_get_rules","blocksmith_page_context"]}],"tools":[{"name":"get_governance_rules","kind":"server","description":"Get the active design system's rules: token palette, do's, don'ts, and component count. Call this before writing or changing any UI code so the result matches the system instead of guessing at values.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"get_governance_rules","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"list_components","kind":"server","description":"List what this design system offers, what is deprecated, and what it has deliberately ruled out. Call this before proposing any component so you build with what exists instead of inventing something the system does not have.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"list_components","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"check_capability","kind":"server","description":"Ask whether this design system allows a given UI pattern before you build it. Answers available, preferred, deprecated, or ruled out — with what to use instead. Call this whenever you are about to reach for a pattern you have not confirmed exists, rather than inventing one.","inputSchema":{"type":"object","properties":{"pattern":{"type":"string","description":"The pattern you want to use, e.g. \"Tooltip\" or \"Modal\"."}},"required":["pattern"]},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"check_capability","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"list_presets","kind":"server","description":"List the design systems available to build against. Use this when the user has no system of their own, or wants to switch which one governs their work.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"list_presets","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"capture_site_design","kind":"server","description":"Read a public website's design decisions — colours, typefaces, radii, spacing, type sizes — and save them as a design system you can then build against. Use this when the user has no design system of their own and wants to start from a site they like. The result is a draft: it has no components and its roles are inferred.","inputSchema":{"type":"object","properties":{"url":{"type":"string","description":"Public page to read, e.g. \"https://stripe.com\"."}},"required":["url"]},"annotations":{"readOnlyHint":true,"untrustedContentHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"capture_site_design","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"export_skill","kind":"server","description":"Turn the active design system into a skill file a coding agent can load, so it writes compliant UI in an editor where these tools are not reachable. Returns a summary and a URL to fetch the file. Use when the user wants their agent to follow this system outside this page.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"export_skill","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"check_governance","kind":"server","description":"Check UI code against the active design system: off-token colors, off-scale spacing, font sizes and radii, banned patterns like gradients or shadows, and Tailwind classes that resolve to non-token values. Returns each violation with its line and the value to use instead. Call before showing generated UI to the user, and again after fixing.","inputSchema":{"type":"object","properties":{"code":{"type":"string","description":"The component source to check."}},"required":["code"]},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"check_governance","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"fix_violations","kind":"server","description":"Apply every mechanical fix the design system can make to a piece of code — off-token colours with a near match, off-scale spacing, type sizes, radii, and Tailwind classes. Returns the corrected code plus anything that still needs a human decision. Use after check_governance rejects something.","inputSchema":{"type":"object","properties":{"code":{"type":"string","description":"The component source to repair."}},"required":["code"]},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"fix_violations","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"explain_violation","kind":"server","description":"Explain why a specific color value violates the design system and which token to use instead. Use this when the user asks why a change was rejected.","inputSchema":{"type":"object","properties":{"hex":{"type":"string","description":"The rejected color, e.g. \"#3b82f6\"."}},"required":["hex"]},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"explain_violation","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"check_component","kind":"server","description":"Check proposed colors against one named component's governance, returning its do's, don'ts, and any deviations. Use this when changing a specific component rather than checking a whole file.","inputSchema":{"type":"object","properties":{"component":{"type":"string","description":"Component name, e.g. \"Button\"."},"colors":{"type":"string","description":"Comma-separated hex colors to check, e.g. \"#fff,#1a1a1a\"."}},"required":["component"]},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"check_component","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"figma_token_drift","kind":"server","description":"Figma says X, code says Y. Pass Figma's variables (the output of get_variable_defs, as an object or JSON string) and get back which tokens agree with this design system, which differ in value, which were renamed, and which exist on one side only. Use it before building from a Figma frame, and to answer whether a file and its code have drifted apart.","inputSchema":{"type":"object","properties":{"variables":{"type":"object","description":"Figma variables: {\"Color/Brand\": \"#4c6ee6\", ...} or [{name, value, type}]. A JSON string is accepted."},"designContextCode":{"type":"string","description":"Optional: raw get_design_context code, to recover de-facto tokens when the file has no variables."},"fileKey":{"type":"string","description":"Optional Figma file key, for the report's provenance."}}},"annotations":{"readOnlyHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"figma_token_drift","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"audit_page_styles","kind":"server","description":"The page says X, the system says Y. Pass what a live page actually paints — its colours with usage counts, typefaces and radii, as collected by the BlockSmith in-page script — and get back how much of it is on-system: exact token matches, near misses with the token to use instead, and values the system has no answer for.","inputSchema":{"type":"object","properties":{"styles":{"type":"object","description":"{url, colors:[{value,count,role}], fonts:[...], radii:[...]} as collected from the page. A JSON string is accepted."}},"required":["styles"]},"annotations":{"readOnlyHint":true,"untrustedContentHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"audit_page_styles","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"audit_site","kind":"server","description":"Judge any public website against this design system, from its address alone. Reads what the page actually paints and reports how much is on-system, which values are near misses with the token to use instead, and which have no token at all. Use when the user asks whether a site or a page of their own is on-brand.","inputSchema":{"type":"object","properties":{"url":{"type":"string","description":"Public page to judge, e.g. \"https://stripe.com\"."}},"required":["url"]},"annotations":{"readOnlyHint":true,"untrustedContentHint":true},"invoke":{"method":"POST","url":"https://blocksmithv1.vercel.app/api/webmcp/invoke","body":{"tool":"audit_site","args":"<arguments>","doc":"<optional design system ref>"},"returns":"{ text }"}},{"name":"propose_component","kind":"page","description":"Put a component or full page in front of the user on the page they are reading, rendered in this design system's own tokens, and get back the governance verdict. Use this instead of only printing code in chat — the user should see the thing, not the markup. Earlier proposals are kept: each new one becomes a version the user can revisit, view as code, or download from the full-page view, so propose freely rather than editing one blob in place.","inputSchema":{"type":"object","properties":{"code":{"type":"string","description":"The component markup to show."},"intent":{"type":"string","description":"One line on what you built, e.g. \"pricing card\"."}},"required":["code"]},"annotations":{"readOnlyHint":false},"invoke":{"how":"document.modelContext on /wiki — runs in the reader's browser, no HTTP equivalent"}},{"name":"propose_design_change","kind":"page","description":"Propose a change to the design system itself — add or edit a colour token, add a do/don't rule, revise a component's guidance. The change is staged for the human to approve; you cannot apply it. Use this when the user wants the system changed, not code written against it.","inputSchema":{"type":"object","properties":{"blockId":{"type":"string","description":"What to change: \"guidelines\", \"token:color:<name>\", \"component:<id>\", \"agent-guide\"."},"summary":{"type":"string","description":"One line a human will read, e.g. \"Add a warning colour\"."},"updatedData":{"type":"string","description":"JSON for that block. guidelines takes {dos:[],donts:[]}; a colour takes {name,value,role}."},"rationale":{"type":"string","description":"Why this is the right change, in one or two sentences."},"create":{"type":"string","description":"Pass \"true\" when this adds a block that does not exist yet, such as a new colour token."}},"required":["blockId","summary","updatedData"]},"annotations":{"readOnlyHint":false},"invoke":{"how":"document.modelContext on /wiki — runs in the reader's browser, no HTTP equivalent"}},{"name":"get_current_context","kind":"page","description":"See what the user is looking at right now: which design system is open in their browser and which page of it. Call this first so your answer applies to their actual screen rather than a guess.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true},"invoke":{"how":"document.modelContext on /wiki — runs in the reader's browser, no HTTP equivalent"}},{"name":"blocksmith_capture_this_site","kind":"anywhere","description":"Read the design system of the page the user is on — colours, type, spacing, radii and repeated components, measured from the rendered page — and save it as a governed design system with a link to open.","parameters":[],"annotations":{"readOnlyHint":true},"invoke":{"how":"registered on any site by https://blocksmithv1.vercel.app/webmcp/blocksmith.js; backed by POST /api/capture"}},{"name":"blocksmith_audit_this_page","kind":"anywhere","description":"Collect what the current page actually paints and judge it against a design system: how much is on-system, near misses with the token to use, values with no token.","parameters":[{"name":"doc","description":"Design system to judge against, e.g. upload:capture-cohere-5f71a053.md. Defaults to the server's default system.","required":false}],"annotations":{"readOnlyHint":true},"invoke":{"how":"registered on any site by https://blocksmithv1.vercel.app/webmcp/blocksmith.js; backed by POST /api/webmcp/invoke → audit_page_styles"}},{"name":"blocksmith_get_rules","kind":"anywhere","description":"The governance rules of a design system — palette, do's and don'ts — without leaving the current page.","parameters":[{"name":"doc","description":"Design system to read; defaults to the server's default system.","required":false}],"annotations":{"readOnlyHint":true},"invoke":{"how":"registered on any site by https://blocksmithv1.vercel.app/webmcp/blocksmith.js; backed by POST /api/webmcp/invoke → get_governance_rules"}},{"name":"blocksmith_page_context","kind":"anywhere","description":"Where the user is: the page's address and title, and a first count of the distinct colours, typefaces and radii it paints. Runs entirely in the page.","parameters":[],"annotations":{"readOnlyHint":true},"invoke":{"how":"registered on any site by https://blocksmithv1.vercel.app/webmcp/blocksmith.js; backed by the page itself"}}],"remoteMcp":{"endpoint":"https://blocksmithv1.vercel.app/api/mcp","transport":"streamable-http","auth":"Authorization: Bearer <BlockSmith API key>","tools":["scan_workspace","import_figma_variables","figma_token_drift","get_design_tokens","get_component_docs","list_components","get_sync_status","get_component_history","log_component_work","check_component_governance","get_governance_rules","pulse_codegen","get_lockfile","get_block_versions","validate_ui_code","check_governance_diff"],"note":"The same governance engine, for agents outside a browser (Cursor, Claude Code, CI)."},"examples":[{"tool":"check_governance","doc":"saas.md","args":{"code":"<button style=\"background:#ff0000;border-radius:2px\">Buy now</button>"},"expect":"Violations with rule ids and the nearest token for each off-system value."},{"tool":"capture_site_design","args":{"url":"https://cohere.com"},"expect":"A design system measured from the rendered page, saved as upload:capture-cohere-<id>.md."},{"tool":"figma_token_drift","doc":"saas.md","args":{"variables":{"Color/Brand":"#4c70e8","Radius/Medium":"8"}},"expect":"Figma says X, code says Y — per token, with renames and near misses told apart from real drift."}],"counts":{"server":13,"page":3,"anywhere":4,"remoteMcp":16}}