Skip to main content
Glama

tree

Read-only

Browse a workspace's folder hierarchy and list every document with its ID and title, mirroring the AFFiNE sidebar for quick navigation.

Instructions

Folder tree of a workspace with every doc (id and title), like the AFFiNE sidebar

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
workspaceNoWorkspace id or name, leave out for the default workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already indicate read-only and closed-world behavior. The description adds that every doc is included with id and title, but it does not explain folder representation, ordering, permissions, or other output details.

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 definition is a single front-loaded sentence with no wasted wording. The sidebar analogy efficiently conveys the intended output shape.

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 read-only tree tool with one optional parameter, the description gives enough context to understand the returned content. It could be slightly more complete about how folders and ordering are represented, but the annotations cover safety and the schema covers the parameter.

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?

The schema fully documents the optional workspace parameter, including the default-workspace behavior when omitted. The description only restates that the tree is scoped to a workspace and adds no further parameter semantics.

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?

The description clearly states that this returns a folder tree for a workspace containing every doc with id and title. The sidebar analogy makes the shape concrete, though it does not explicitly distinguish itself from related read/list tools.

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?

Usage is implied by 'like the AFFiNE sidebar' — it is for browsing workspace structure and locating docs. There is no explicit when-to-use guidance or comparison with search, read_doc, or list_workspaces.

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