Skip to main content
Glama

find_source_for_selection

Identify ranked source files for a live UI selection or stored thread, so you know where the component lives; verify the top candidate before editing.

Instructions

Just the ranked source files for the current selection or a stored thread — for when you only need to know where the component lives. Heuristic: verify the top candidate before editing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idNoWork from a stored comment instead of a live selection.
selection_idNoA specific selection by correlation id (see get_selection_history). Omit for the most recent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose a useful trait — output is a ranked list and the top candidate is a heuristic that should be verified before editing — but says nothing about what happens when no selection exists, latency, or result count.

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?

Two tightly written sentences: scope first, then the practical heuristic. No filler and nothing buried.

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 simple two-parameter read tool with no output schema and no annotations, the description conveys what is returned (ranked source files) and how to treat it. It is adequate, though a note on what happens with an unresolved selection would close the last gap.

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 both thread_id and selection_id are already documented in the schema, including the 'omit for most recent' behavior. The description's 'current selection or a stored thread' only restates that mapping without adding syntax or precedence rules, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ('find' / 'ranked source files') and scopes it to a current selection or stored thread, with the qualifier 'Just ... for when you only need to know where the component lives' that implicitly separates it from richer context siblings like get_element_context. It never names that sibling explicitly, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Gives a use condition ('when you only need to know where the component lives'), which is more than nothing, but names no alternative and no exclusions. An agent must infer that get_element_context or get_selection_history are the richer alternatives for other needs.

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