Skip to main content
Glama

Read the DOM context of a bug

feedbug_get_html_context
Read-onlyIdempotent

Retrieve the CSS selector path, framework component tree, and full DOM context of the element clicked during a bug report to trace the issue directly to its source component.

Instructions

Read the HTML and DOM context captured at the instant the tester clicked on the bug.

Returns: a JSON object with the CSS selector path, the framework component path (Vue, React, Angular, Svelte), the clicked element itself (tag, id, classes, text, attributes), its ancestors and its siblings. Use when: you need to map a report onto a source file — this is the shortest path from a bug to the component that renders it. Do not use when: the bug is about a behaviour rather than one element; feedbug_get_replay shows what the tester actually did. Behavior: read-only and idempotent, scoped by FEEDBUG_PROJECT_KEY to a single project. A report captured without DOM context errors with "No HTML context captured for this bug" rather than returning an empty tree. Component paths survive a Vue build but are often absent from minified React, in which case fall back to the selector path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBug UUID as returned by feedbug_list_bugs, or the tracker identifier such as PRE-13, matched case-insensitively. Ids belonging to another project are rejected.

Schema Changelog

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

  1. Changed1 schema field changedv1.1.2
    • changedInput schema / properties / id / description
      Previous value: -"Feedback UUID or Linear identifier (e.g. PRE-13)"New value: +"Bug UUID as returned by feedbug_list_bugs, or the tracker identifier such as PRE-13, matched case-insensitively. Ids belonging to another project are rejected."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description goes beyond these by adding scoping (by FEEDBUG_PROJECT_KEY), error behavior (returns error message instead of empty tree when no DOM context), and platform-specific fallback behavior (component paths survive Vue builds but are absent in minified React, fall back to selector path). No contradiction with annotations.

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

Conciseness5/5

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

The description is approximately 100 words, well-structured with a clear opening sentence, return value explanation, use/don't use sections, and behavioral notes. Every sentence adds distinct value, and there is no fluff or redundancy.

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

Completeness5/5

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

Given the tool has only one parameter, no output schema, and no nested objects, the description covers everything needed: what it returns (JSON object with specific fields), when to use it, when not to, error handling, and platform-specific behavior. It is fully self-contained and sufficient for an agent to invoke correctly.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The tool description does not add new information about the 'id' parameter beyond what the schema already provides (the schema already describes the parameter as a bug UUID or tracker identifier). The description mentions scoping by project key, which is related but does not directly enhance parameter semantics. Hence minimal added value.

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 starts with a precise verb and resource: 'Read the HTML and DOM context captured at the instant the tester clicked on the bug.' It lists the returned components (CSS selector path, component path, clicked element, ancestors, siblings), which clearly distinguishes it from siblings like feedbug_get_bug (general bug info) or feedbug_get_replay (behavioral replay).

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 explicitly includes 'Use when:' and 'Do not use when:' sections, stating that it is the shortest path from a bug to its source component, and that for behavioral bugs the alternative feedbug_get_replay should be used instead. This provides clear and actionable guidance for tool selection.

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

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/joffreyBerrier/feedbug-mcp'

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