Skip to main content
Glama

capture_reference

Destructive

Persist any grabbed UI pattern as a durable reference with selector, styles, HTML, URL, and an offline thumbnail. Keeps design work from vanishing when the tab closes.

Instructions

Persist a pattern grabbed from any page so it survives the browser tab. Call it after get_grabbed_elements returns a selection, passing that selection's selector/styles/html/rect/stateStyles plus the URL it was grabbed from. Stores one JSON record under ~/.raven/references; html over 8000 chars is truncated and flagged, style maps over 200 properties are rejected, and non-http(s) URLs are rejected. Every save gets a fresh ref_id, so grabbing the same element twice keeps both. When html is supplied it also renders a PNG thumbnail beside the record by rebuilding that markup offline in headless Chromium — every external request is blocked, so remote images and webfonts are absent and the record says so (image.fidelity 'offline'). The thumbnail is best-effort: if no browser is available the capture still succeeds, with no image field. It does not fetch the source URL, and does not map anything onto the project's tokens — that is map_reference_to_tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNoHuman name of the source app, e.g. 'Linear'
urlYesFull http(s) URL of the page the pattern was grabbed from
htmlNoouterHTML of the grabbed element; truncated to 8000 chars on save
noteNoThe designer's own words about why this pattern was kept; the highest-weighted field in search
rectNoBounding rect of the grabbed element in page coordinates
tagsYesTopic tags for later filtering, e.g. ['hero','typography']
ownerYesWhether the pattern came from the user's own product or someone else's site
stylesYesComputed styles exactly as captured; rejected over 200 properties
selectorYesCSS selector of the grabbed element, from the grab selection
taxonomyNoStable pattern-kind ids binding this element to Raven's controlled vocabulary — this is what makes it findable by INTENT ('a scrolling mouse icon in a hero') rather than by the words that happen to be in the note. Bind every applicable kind; an unrecognized id is rejected with near matches. One of: scroll-cue, hero, sticky-nav, top-nav, sidebar-nav, breadcrumbs, command-palette, dropdown-menu, mobile-menu, cta-button, sticky-cta, pricing-card, pricing-toggle, comparison-table, testimonial, testimonial-marquee, logo-cloud, star-rating, signup-form, social-login, stepper, inline-validation, empty-state, no-results, error-message, error-page, skeleton-loader, progress-indicator, modal, confirmation-dialog, toast, bottom-sheet, kpi-card, activity-feed, feature-block, footer-cta
stateStylesNoAlias of state_styles, matching the field name get_grabbed_elements returns
state_stylesNoPer-state styles, either { hover: { color: 'red' } } or the grab selection's own { hover: { declarations: [{ property, value }] } }

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv2.5.1

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description thoroughly discloses side effects: it stores a JSON record under ~/.raven/references, truncates html over 8000 chars, rejects style maps over 200 properties, rejects non-http(s) URLs, gives every record a fresh ref_id, and attempts an offline PNG thumbnail with best-effort fallback. The annotations only say destructiveHint=true; the description carries the full behavioral burden and does it well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but each sentence adds useful context: invocation order, storage behavior, truncation/rejection rules, thumbnails, and exclusions. It is slightly long, but the length is justified by the number of behavioral caveats an agent needs to know before calling a capture-and-persist tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter mutation tool with no output schema, the description covers the essential ground: what gets persisted, where, what constraints apply, what happens if the browser is unavailable, and which related tools handle adjacent concerns. It doesn't state the response shape beyond mentioning ref_id, but an agent can call the tool correctly without that detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by telling the caller to pass fields exactly as returned from get_grabbed_elements and by highlighting runtime constraints on html length, style property count, and URL scheme. It doesn't add much on parameters like owner or tags, but the schema already explains those clearly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb and resource: 'Persist a pattern grabbed from any page so it survives the browser tab.' It also explicitly distinguishes itself from map_reference_to_tokens by stating what it does not do, so an agent can tell which tool to use without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit call sequence: call it after get_grabbed_elements returns a selection, and pass that selection's selector/styles/html/rect/stateStyles plus the URL. It also gives a negative case: mapping onto project tokens belongs to map_reference_to_tokens, and this tool does not fetch the source URL.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rhinocap/raven-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server