Skip to main content
Glama

Find objects

find_objects
Read-only

Find object IDs in SVG documents by filtering on tag, fill, stroke, text, ID prefix, or bounding box. Use before editing to target specific elements.

Instructions

Find addressable object ids in a tracked document by tag / paint / text / id-prefix / bbox.

When to use: before an id-taking edit (set_fill, move_object, replace_text, rotate_object, …) on a document the agent did not author, or to enumerate "every blue rect", "every text mentioning 'Total'", etc. For the full structural picture (tree / layers / styles / fonts / assets) plus the same list use inspect_document; to map a goal to a tool, how_do_i.

Key params (all filters optional; supplied filters AND together; none → every addressable object): tag exact local name ("rect"/"text"/"path"); fill/stroke a paint matched casing- and hex-shorthand-insensitive ("#FFF" matches "#ffffff") — matching resolves the FULL CSS cascade so an object painted via a <style> rule / class / id selector or INHERITED from an ancestor <g> is matched too (the reported fill/stroke stay the per-element authored token); text a case-insensitive substring of text content; id_prefix an id prefix; bbox an {x, y, width, height} box kept on INTERSECTION. By default bbox uses the attribute-derived box and objects with no derivable box (path/text/group/transformed) are EXCLUDED; set accurate_bbox=true to compute geometry-accurate, transform-/outline-aware boxes via one batched Inkscape --query-all call (so those objects can match) — it degrades to the attribute box when the Inkscape engine is unavailable.

Return shape: FindResult{doc_id, count, objects: [{object_id, tag, bbox?, fill?, stroke?, text?}]}. Objects without an id are never returned (they cannot be targeted). With accurate_bbox=true, bbox carries the engine box where one was reported.

Example: find_objects("d_ab12", tag="rect", fill="#3366cc")

Risk class: low for the default direct-DOM path (read-only, ADR-005; no snapshot / Operation Record); accurate_bbox=true adds a read-only Inkscape --query-all invocation (medium, still no mutation).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
bboxNo
fillNo
textNo
doc_idYes
strokeNo
id_prefixNo
accurate_bboxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
doc_idYes
objectsYes
Behavior5/5

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

Annotations declare readOnlyHint=true; description adds details on matching (CSS cascade), return shape, risk class, accurate_bbox behavior, and limitations (objects without id never returned). No contradiction.

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?

Front-loaded with clear purpose, then usage, param details, return shape, example, risk. Every sentence adds value; well-organized and appropriately sized.

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?

Complete for a complex tool with 8 parameters and output schema. Covers all key aspects: when to use, parameter semantics, return format, edge cases (no-id objects, accurate_bbox fallback), and risk level.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates by explaining each parameter in detail (tag, fill/stroke, text, id_prefix, bbox, accurate_bbox) with matching rules and default filters.

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 clearly states 'Find addressable object ids in a tracked document by tag / paint / text / id-prefix / bbox', which is specific and distinguishes it from siblings like inspect_document and how_do_i.

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?

Explicitly says 'When to use: before an id-taking edit...' and mentions alternatives (inspect_document, how_do_i), providing clear guidance on when to use this tool versus others.

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/jjjsood/inkscape-mcp-server'

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