Skip to main content
Glama

List branches

list_branches
Read-onlyIdempotent

List a library system's branches with address, phone, today's hours, and open-now status. Filter by name or open state, and sort results by distance from given coordinates.

Instructions

List a library system's branches with address, phone, today's hours and whether each is open right now. Pass coordinates to sort by distance. Use get_branch for a branch's full weekly hours and services.

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": "list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
libraryNoLibrary system id such as "tpl" (Toronto), "vpl" (Vancouver), "chipublib" (Chicago). Get it from find_library. A city or library name also works.
open_nowNoOnly branches that are open right now.
name_containsNoOnly branches whose name contains this text.
near_latitudeNoSort by distance from this point (requires near_longitude).
near_longitudeNo

Output Schema

NameRequiredDescriptionDefault
totalYesBranches in the system matching the filters.
sourceYesProvenance of the data.
libraryYes
branchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered; the description adds useful behavioral context about what each row includes (today's hours plus live open status) and the distance-sort behavior. It omits pagination/limit behavior and any rate or freshness caveats for an open-world API.

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 short sentences with no filler: capability first, sorting second, alternative third. Nothing is repeated from the annotations or title, and each sentence carries distinct information.

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?

With an output schema present, the description need not document return shapes, and the one-sentence summary of what fields come back is enough for selection. For a six-parameter, open-world list tool it is nearly complete; only the effect of limit/pagination on result sets is unaddressed.

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 67%, so several parameters are already documented. The description adds real meaning to the coordinate pair by explaining the sort effect, which compensates for near_longitude having no schema description, but limit, open_now, name_contains and the multi-format library value are left entirely to the schema.

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 ('List a library system's branches') and enumerates the returned fields (address, phone, today's hours, open-now status). It also directly contrasts with get_branch, so an agent can distinguish the two 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?

Names the alternative explicitly ('Use get_branch for a branch's full weekly hours and services') and gives a condition for a parameter ('Pass coordinates to sort by distance'). No explicit when-not guidance or prerequisite chain (e.g., that find_library must run first) is stated, though the schema covers the latter.

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