Skip to main content
Glama

get_links

Read-only

List the links a document points to and the backlinks pointing to it, so you can find what relies on a doc before changing or moving it. Filter by in or out direction.

Instructions

List the [[wikilinks]] around a document: links, the docs it points to, and backlinks, the docs that point to it, e.g. to find what relies on a doc before changing or moving it. Works on .md and .html docs. direction keeps one side, to spare a long list: out for links only, in for backlinks only (default both). A doc you may not read is left out. Use get_mind_topology for the whole graph's shape, brief to read the sections linked around a topic.

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": {
      "path": "<path>"
    },
    "name": "get_links"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the .md or .html, e.g. notes/example.md.
directionNoout: only `links`; in: only `backlinks`; both: the two.both

Output Schema

NameRequiredDescriptionDefault
pathYes
linksNo
backlinksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.9.0
    • addedInput schema / properties / direction
      Added value: +{
      +  "default": "both",
      +  "description": "out: only `links`; in: only `backlinks`; both: the two.",
      +  "enum": [
      +    "both",
      +    "out",
      +    "in"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / backlinks
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "path",
      -  "links"
      -]New value: +[
      +  "path"
      +]
  2. Changed1 schema field changedv2.8.0
    • changedInput schema / properties / path / description
      Previous value: -"Relative path of the .md/.html (e.g. notes/example.md)"New value: +"Path of the .md or .html, e.g. notes/example.md."
  3. First observedv2.7.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description still adds real behavior: it works only on .md and .html docs, and 'a doc you may not read is left out' discloses permission-based filtering of results, which is not visible anywhere in the annotations or schema.

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?

The definition is front-loaded with the core semantics before the alternative-tool routing, and every clause carries information. It is dense, with several parenthetical and comma-stacked clauses, which slightly raises reading effort but does not waste words.

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 an output schema present, return values need no explanation. For a two-parameter read tool the description covers applicable file types, permission filtering, direction semantics and alternative tools — nothing an agent needs to call it correctly is missing.

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, but the description adds the rationale for `direction` ('out for `links` only, in for `backlinks` only', default both, and that it exists 'to spare a long list') plus the .md/.html constraint on `path`. That goes beyond restating the enum.

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?

The description opens with a specific verb and resource ('List the [[wikilinks]] around a document') and immediately defines both result sets, `links` and `backlinks`, in plain terms. It also explicitly differentiates itself from get_mind_topology, so an agent can pick between them without inspecting schemas.

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?

It gives a concrete when-to-use scenario ('to find what relies on a doc before changing or moving it'), explains when to narrow with `direction`, and names two alternatives (get_mind_topology for whole-graph shape, brief for reading linked sections). That is explicit routing rather than inferred usage.

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