Skip to main content
Glama

Build Relational Wiki-Link Topic Graph

okf_topic_graph
Read-onlyIdempotent

Computes a directed wiki-link graph across local Markdown notes to rank referenced topics and surface dangling links, helping map recurring entities or audit broken links.

Instructions

Compute the directed [[wiki-link]] knowledge graph across all Markdown notes in the local vault, ranking the most referenced topics and identifying unresolved (dangling) wiki-links. Use this to map recurring entities/projects or audit broken links; prefer okf_vault_stats for high-level aggregate counts or okf_read_note to inspect one topic page. Read-only and 100% offline. Takes no parameters and returns JSON with totalNotes, totalEdges, topTopics, unresolvedLinks, and edges.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds scope over the whole vault, an offline guarantee, and — importantly given there is no output schema — the exact top-level JSON keys returned. It does not discuss scale/cost on very large vaults, 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.

Conciseness4/5

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

Front-loads the core computation, then use cases, then alternatives, then return shape — a sound ordering with no filler. 'Read-only and 100% offline' partially restates the annotations, a minor redundancy.

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 parameterless read-only graph computation with no output schema, the description supplies the missing piece: the returned field names (totalNotes, totalEdges, topTopics, unresolvedLinks, edges). An agent knows what it gets and when to call it.

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?

Zero parameters, and the description explicitly confirms 'takes no parameters', matching the empty schema and setting expectations before invocation. With no arguments to disambiguate, baseline is 4.

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 — compute the directed wiki-link graph across all Markdown notes in the local vault — and adds the analytic outputs (most-referenced topic ranking, dangling link detection). This is clearly distinguishable from okf_read_note and okf_vault_stats 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?

Gives two concrete use cases (mapping recurring entities/projects, auditing broken links) and explicitly routes to alternatives: okf_vault_stats for aggregate counts and okf_read_note for a single topic page. The when-not conditions are named alongside the sibling tools.

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