Skip to main content
Glama

search_library

Finds library sections and figures by keyword or semantic search, returning ranked hits with snippets, section IDs, and ready-to-paste citations for quick lookup.

Instructions

Search library sections (and figures) by keyword — or semantically when the library has embeddings. Returns ranked hits with snippets, section ids and ready-to-paste citations. Scope with library and/or volume; then call get_library_section with a hit's section.id for the full text. Works on cloud libraries connected to the workspace too: pass the library's id, title or path as library — they are read-only and answered from Hillnote Cloud.

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": {
      "workspace": "<workspace>",
      "query": "<query>"
    },
    "name": "search_library"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoRanking mode (default keyword; semantic/hybrid need embeddings and fall back to keyword)
kindsNoWhat to match (default ["section"])
limitNoMax results (default 20, max 100)
queryYesSearch terms; quote phrases ("carbon dioxide")
offsetNoPagination offset (default 0)
volumeNoRestrict to one volume (id, folder name or title)
libraryNoRestrict to one library (id, folder path or title)
workspaceYesWorkspace path/name
snippetCharsNoApproximate snippet length in characters (default 240)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.19.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose meaningful behavior: semantic/hybrid modes fall back to keyword without embeddings, cloud libraries are read-only and answered from Hillnote Cloud, and results include snippets and ready-to-paste citations. It omits auth requirements, rate limits, and result ordering/pagination behavior, which keeps it short of a 5.

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?

Three dense sentences with no filler: capability and return shape first, then scoping and follow-up, then the cloud-library caveat. Every clause carries information an agent needs to pick or call the tool.

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 9-parameter tool with no output schema, the description does the heavy lifting by describing the return payload and the follow-up path, and the 100%-covered schema handles the rest. Pagination and empty-result behavior are only implied via `offset`/`limit`, leaving a small 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 adds real value by clarifying that `library` accepts a cloud library's id, title or path and that `volume`/`library` are the scoping levers. It does not add meaning for `mode`, `kinds`, `limit`, `offset`, or `snippetChars` beyond the schema, but the schema already documents those well.

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 ('Search library sections (and figures)') along with the retrieval strategy (keyword or semantic) and the shape of the result (ranked hits with snippets, section ids, citations). It also names the natural follow-up tool, get_library_section, which lets an agent place it in the workflow without opening a schema.

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 clear operational routing: scope with `library` and/or `volume`, then call get_library_section with a hit's section.id for full text, and pass a cloud library's id/title/path as `library` for read-only cloud results. It does not explicitly contrast itself with the sibling search_documents, so an agent must infer which search surface to use.

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