{"at":"2026-11-23T03:30:13.930Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:30:14.394Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:30:14.495Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:30:14.978Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"resources":{"listChanged":true},"tools":{"listChanged":true}},"instructions":"c2n web components (Lit custom elements, tag prefix c2-, npm scope @c2n). In a project that uses them, build every control and widget from a c2-* element rather than a native element or a hand-rolled one (c2-button, not <button>; c2-text-field, c2-select, c2-modal, c2-table, …), even when the request does not mention c2n; call search_components before concluding no component fits. Their APIs change between releases, so never write a c2-* tag, attribute, slot, event or --c2-* variable from memory: call get_component for every component before using it, and use only the names it returns. Start with list_components or search_components, then get_component for the API and get_examples for markup. Use the import lines get_component gives: a project that installed @c2n/components imports @c2n/components/<name>, not @c2n/<name>. get_component also names the child elements a container expects (c2-dashboard holds c2-dash-card, c2-tabs holds c2-tab): build them in. Call get_theme before writing CSS: apps set ~35 --c2-theme--* tokens once; restyle a component only through the --c2-<component>__<part>--<property> variables get_component lists, set on a class or the element, never with border, padding, background, color or size rules on the c2-* host, and use only documented ::part() hooks when variables cannot express the change. For the look, browse the docs gallery before inventing CSS: get_examples with view \"index\" lists every card of a component (summary, screenshot), search_examples finds a look across components; adapt the chosen card to the application tokens (its remaining colour literals are accents to swap), and start a variant from it with generate_variant `example`. When a look repeats, call generate_variant (css | html | lit) instead of repeating inline styles. Before finishing, call validate_markup on the markup and CSS you wrote and fix what it reports. get_workflow_guide explains the application workflow, theming, variant components and framework notes.","protocolVersion":"2025-11-25","serverInfo":{"name":"c2n","version":"1.0.26"}}}}
{"at":"2026-11-23T03:30:14.978Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:30:14.978Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:30:14.983Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Lists every c2n component (tag, package, category, one-line description, installed version in the current project).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Only this category","enum":["Inputs","Buttons","Navigation","Layout","Data display","Editors & viewers","Chart","Planning","Feedback","Chat","Icons"],"type":"string"},"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"},"installedOnly":{"description":"Only packages installed in the current project","type":"boolean"},"keyword":{"description":"Substring filter on tag, title or description","type":"string"}},"type":"object"},"name":"list_components","title":"List components"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Full API of one component: install/import lines, attributes, slots, events, native CSS parts, CSS variables grouped by semantic target and state (with the theme token each follows), composition and preset names. Examples are served by get_examples.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"},"include":{"description":"Sections to include (default: all)","items":{"enum":["attributes","slots","events","parts","css","composition","presets"],"type":"string"},"type":"array"},"tag":{"description":"Component tag, id or package: `c2-button`, `button`, `@c2n/button`, `c2-tab`, or a concrete icon tag such as `c2-feather-arrow-right`","minLength":1,"type":"string"}},"required":["tag"],"type":"object"},"name":"get_component","title":"Get component API"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Free-text search across component names, descriptions, attributes, slots, events, example labels and icon names. Use it to find the component for a UI need (\"dropdown\", \"dialog\", \"avatar with status\", \"arrow icon\").","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":10,"maximum":25,"minimum":1,"type":"integer"},"query":{"description":"What you are looking for","minLength":2,"type":"string"}},"required":["query"],"type":"object"},"name":"search_components","title":"Search components"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Markup examples of a component: usage rows from the docs, styled gallery cards (the looks shown on the docs site, each with a summary of what it changes and light/dark screenshots) and the landing preview. Start with `view: \"index\"` to see every look on one page, then fetch the chosen card by its slug.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"},"kind":{"description":"Only this kind","enum":["usage","gallery","preview"],"type":"string"},"label":{"description":"Substring filter on the example label, or a gallery slug from the index","type":"string"},"limit":{"default":8,"maximum":20,"minimum":1,"type":"integer"},"offset":{"default":0,"maximum":9007199254740991,"minimum":0,"type":"integer"},"query":{"description":"Search label, section, description, use case, accessibility note and component tags","type":"string"},"section":{"description":"Gallery section filter (e.g. \"Variants\", \"Sizes\")","type":"string"},"tag":{"description":"Component tag, id or package: `c2-button`, `button`, `@c2n/button`, `c2-tab`, or a concrete icon tag such as `c2-feather-arrow-right`","minLength":1,"type":"string"},"view":{"default":"full","description":"`index`: one line per example (label, slug, summary, screenshot), no code and no paging; `full`: markup and CSS","enum":["full","index"],"type":"string"}},"required":["tag"],"type":"object"},"name":"get_examples","title":"Get examples"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Search every component's gallery for a look or a use case (\"compact\", \"glass\", \"pill\", \"danger\", \"underline input\", \"KPI\"): returns matching cards across components with their summary and screenshot. Fetch one with get_examples `label: <slug>`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":12,"maximum":30,"minimum":1,"type":"integer"},"query":{"description":"The look or situation you want","minLength":2,"type":"string"},"tag":{"description":"Limit to one component","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"search_examples","title":"Search gallery looks"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Curated presets of a component (\"inspiration\" looks): base markup plus each preset as CSS variable values and attributes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"},"name":{"description":"Substring filter on the preset name","type":"string"},"tag":{"description":"Component tag, id or package: `c2-button`, `button`, `@c2n/button`, `c2-tab`, or a concrete icon tag such as `c2-feather-arrow-right`","minLength":1,"type":"string"}},"required":["tag"],"type":"object"},"name":"get_presets","title":"Get presets"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"The @c2n/theme design tokens (--c2-theme--*) with light/dark defaults, how to install and map your own tokens, and dark mode. With `tag`: which of that component's variables follow which token.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"},"tag":{"description":"Component tag, id or package: `c2-button`, `button`, `@c2n/button`, `c2-tab`, or a concrete icon tag such as `c2-feather-arrow-right`","minLength":1,"type":"string"}},"type":"object"},"name":"get_theme","title":"Get theme tokens"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Turns CSS variable / attribute overrides of a component into copy-paste code: a CSS class, HTML + <style>, a Lit subclass registered under your own tag, or JSON. Validates variable and attribute names against the component API. Start from a curated preset with `preset`, or from a gallery card with `example` (its slug or label).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"attributes":{"additionalProperties":{"type":"string"},"description":"Attributes to fix, e.g. {\"running\": \"true\"}","propertyNames":{"type":"string"},"type":"object"},"css":{"additionalProperties":{"type":"string"},"description":"Component CSS variables to fix, e.g. {\"--c2-button__container--background-color\": \"var(--c2-theme--color-error)\"}","propertyNames":{"type":"string"},"type":"object"},"example":{"description":"Gallery card to start from, by slug or label (get_examples view: index): its themed variables for this component are merged under `css`","type":"string"},"format":{"default":"all","enum":["css","html","lit","json","all"],"type":"string"},"html":{"description":"Base markup; defaults to the example or preset markup, else `<tag>Label</tag>`","type":"string"},"name":{"description":"Class / tag name of the variant (kebab-case, must contain a hyphen, not c2-*)","pattern":"^[a-z][a-z0-9]*(-[a-z0-9]+)+$","type":"string"},"preset":{"description":"Name of a curated preset to start from (its values are merged under `css`)","type":"string"},"tag":{"description":"Component tag, id or package: `c2-button`, `button`, `@c2n/button`, `c2-tab`, or a concrete icon tag such as `c2-feather-arrow-right`","minLength":1,"type":"string"}},"required":["tag","name"],"type":"object"},"name":"generate_variant","title":"Generate a variant component"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Checks HTML, JSX, Vue, Svelte, Astro, Angular or Lit markup and CSS you wrote against the installed c2n API: native controls a c2-* element replaces (<button>, <input>, <select>, <textarea>, <dialog>, <details>, <progress>), unknown c2-* tags, attributes, slots, events and --c2-* variables (with \"did you mean\"), and box styling on a c2-* host. Lists the imports that register the elements used. Call it on every file you write before finishing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"code":{"description":"The source to check: a component file, a template, a stylesheet or a snippet","minLength":1,"type":"string"},"filename":{"description":"File name, which sets how the source is read (`App.tsx`: JSX props; `styles.css`: a stylesheet). Always pass it; without it the source is read as HTML","type":"string"},"format":{"default":"markdown","description":"Output format","enum":["markdown","json"],"type":"string"}},"required":["code"],"type":"object"},"name":"validate_markup","title":"Validate markup"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"The c2n application workflow guides: `workflow` (theme once, use tags, name what repeats), `theming`, `variant-components`, `frameworks` (plain HTML, Lit, Astro, React, Vue, SSR).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"topic":{"default":"workflow","enum":["workflow","theming","variant-components","frameworks"],"type":"string"}},"type":"object"},"name":"get_workflow_guide","title":"Get workflow guide"}]}}}
