Skip to main content
Glama

Find Doc by Title

find_doc_by_title
Read-onlyIdempotent

Resolve AFFiNE documents by exact title and return every matching metadata record up to a set limit, with optional case-insensitive matching for ambiguous titles.

Instructions

Resolve docs by exact title. Returns ALL matches up to limit (callers handle ambiguity). Case-sensitive by default; pass caseInsensitive: true to fold case. Reads workspace metadata — fast, no per-doc fetch. Unlike search_docs (which is always case-insensitive and capped at limit 20), this tool defaults to case-sensitive matching and returns up to limit matches (default 50, max 200). Prefer this over search_docs when you know the exact title and want every match. Returns: { query, caseInsensitive, matches: [{ id, title, createdAt, updatedAt, inTrash }], workspaceDocCount, truncated }.

Input Schema

NameRequiredDescriptionDefault
limitNoMax matches to return (default: 50).
titleYesThe exact title to match.
workspaceIdNoWorkspace ID (optional if AFFINE_WORKSPACE_ID is set).
caseInsensitiveNoIf true, fold case for comparison (default: false).

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
errorNo
queryNo
detailsNo
matchesNo
causeCodeNo
retryableNo
truncatedNo
caseInsensitiveNo
recoveryGuidanceNo
workspaceDocCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the case-sensitivity default and its override, the performance profile ("reads workspace metadata — fast, no per-doc fetch"), the match ceiling and truncation behavior, and that ambiguity is deliberately not resolved. This is context annotations cannot convey.

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

Conciseness4/5

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

Front-loaded with the one-line purpose, then the discriminating details. Dense but nearly every clause carries information, though the explicit "Returns: {...}" block is somewhat redundant given an output schema exists.

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?

For a read-only lookup tool with an output schema, everything an agent needs is present: scope, defaults, limits, case behavior, performance, and sibling routing. The return-shape restatement is slight surplus rather than a gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns more by clarifying cross-tool semantics the schema cannot — search_docs caps at 20 while here limit defaults to 50 and maxes at 200, and caseInsensitive is off by default. It does not mention workspaceId's env-var fallback, though the schema does.

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?

States a specific verb and resource ("Resolve docs by exact title") plus the key behavioral distinction (returns ALL matches, ambiguity left to callers). An agent can immediately tell what this does and how it differs from search_docs.

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 contrasts with the sibling ("Unlike `search_docs`...") and gives the selection rule: "Prefer this over `search_docs` when you know the exact title and want every match." Both when-to-use and the alternative are named outright.

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

Deploy Server

Other Tools