Skip to main content
Glama

Find elements on the board

query_elements
Read-only

Query elements on a canvas. Requires room_id from a previous Canvs tool result. Returns elements matching optional filters. Use this before update_elements when making small edits to existing diagrams. If no browser has the canvas open, returns an error — ask the user to open the canvas URL in their browser and retry.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "room_id": "<room_id>"
    },
    "name": "query_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoFilter by element type
filterNoAdditional key-value filters (e.g., {locked: true})
room_idYesRoom ID from a previous Canvs tool result. If you only have a URL, extract it from https://canvs.io/app/?room=[room_id] or https://canvs.io/app/?gdrive=[room_id].

Output Schema

NameRequiredDescriptionDefault
countYesNumber of matching elements
elementsYesMatching elements

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / room_id / description
      Previous value: -"Room ID from a previous Canvs tool result. If you only have a URL, extract it from https://[host]/?room=[room_id] or https://[host]/gdrive?id=[room_id]."New value: +"Room ID from a previous Canvs tool result. If you only have a URL, extract it from https://canvs.io/app/?room=[room_id] or https://canvs.io/app/?gdrive=[room_id]."
  2. Changed3 schema fields changed
    • addedInput schema / properties / room_id
      Added value: +{
      +  "description": "Room ID from a previous Canvs tool result. If you only have a URL, extract it from https://[host]/?room=[room_id] or https://[host]/gdrive?id=[room_id].",
      +  "type": "string"
      +}
    • removedInput schema / properties / room_url
      Removed value: -{
      -  "description": "Canvas URL from create_canvas (e.g. https://canvs.io/?room=XXXX) or a Google Drive board URL (e.g. https://canvs.io/gdrive?id=FILE_ID)",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "room_url"
      -]New value: +[
      +  "room_id"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of matching elements",
      +      "type": "number"
      +    },
      +    "elements": {
      +      "description": "Matching elements",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "elements"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / room_url / description
      Previous value: -"Room URL (from create_canvas) or room ID to operate on"New value: +"Canvas URL from create_canvas (e.g. https://canvs.io/?room=XXXX) or a Google Drive board URL (e.g. https://canvs.io/gdrive?id=FILE_ID)"
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely non-obvious behavioral context: the live-browser dependency and the resulting error plus the recommended remediation (ask the user to open the canvas URL and retry). It does not explain result ordering or limits, but the output schema covers return shape.

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?

Four short sentences, front-loaded with purpose, then precondition, then usage, then failure mode and remedy. Nothing is redundant and each sentence carries actionable information.

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?

With rich annotations, a full output schema, and 100% parameter coverage, the remaining burden is behavioral context — and the description supplies the key operational hazard (no open browser causes an error) and what to do about it. An agent can call this correctly without additional inference.

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 type, filter, and room_id are all documented in the schema, including the URL-extraction hint for room_id. The description only restates that filters are optional and that room_id comes from a prior tool result, adding little meaning beyond the structured fields.

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 ('Query elements on a canvas') and clarifies the result ('Returns elements matching optional filters'). It is distinguishable from add/delete siblings by being a filtered read, though the description doesn't explicitly frame it against those siblings beyond naming update_elements as a follow-on.

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

Usage Guidelines4/5

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

Gives a concrete usage context ('Use this before update_elements when making small edits to existing diagrams') and a precondition ('Requires room_id from a previous Canvs tool result'). It stops short of stating when NOT to use it (e.g., for large-scale rebuilds vs. targeted reads), so routing guidance is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources