Skip to main content
Glama
bezata

kObsidian MCP

Find Orphaned Notes

links.orphaned
Read-onlyIdempotent

Identify notes with no incoming or outgoing links. Use this to clean up disconnected content in your vault.

Instructions

Return every note with zero incoming AND zero outgoing links — i.e., notes that are disconnected from the rest of the vault graph. Useful for cleanup passes. Read-only. Often paired with links.hubs and links.broken in a weekly vault-health routine.

Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultPathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYesNumber of items in `items`.
itemsYesList of result items; per-item shape depends on the tool.

Implementation Reference

  • Core handler function for 'links.orphaned'. Builds the full link graph then filters for notes with zero inlinks AND zero outlinks (disconnected from the graph). Returns the list of orphaned file paths.
    export async function findOrphanedNotes(context: DomainContext, args: { vaultPath?: string }) {
      const graph = (await getLinkGraph(context, args)).graph;
      const items = Object.entries(graph)
        .filter(([, value]) => value.inlinks.length === 0 && value.outlinks.length === 0)
        .map(([filePath]) => ({ filePath, inlinkCount: 0, outlinkCount: 0 }));
      return { items, total: items.length };
    }
  • Input schema for 'links.orphaned' — accepts an optional vaultPath string.
    export const linksOrphanedArgsSchema = z.object({ vaultPath: z.string().optional() }).strict();
    export type LinksOrphanedArgs = z.input<typeof linksOrphanedArgsSchema>;
  • Tool registration for 'links.orphaned' in the linkTools array. Maps the tool name to input schema, output schema, and handler.
    {
      name: "links.orphaned",
      title: "Find Orphaned Notes",
      description:
        "Return every note with zero incoming AND zero outgoing links — i.e., notes that are disconnected from the rest of the vault graph. Useful for cleanup passes. Read-only. Often paired with `links.hubs` and `links.broken` in a weekly vault-health routine.",
      inputSchema: linksOrphanedArgsSchema,
      outputSchema: listResultSchema,
      annotations: READ_ONLY,
      handler: async (context, rawArgs) => {
        const args = linksOrphanedArgsSchema.parse(rawArgs) as LinksOrphanedArgs;
        return findOrphanedNotes(context, args);
      },
    },
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint. Description adds valuable context about operating on session-active vault vs. explicit vaultPath, which is beyond what annotations provide.

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 succinct sentences front-loaded with purpose. No wasted words; every sentence adds value.

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 simple read-only list tool with output schema, description covers purpose, usage, and parameter behavior adequately.

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?

Input schema has 0% coverage for vaultPath, but description explains that vaultPath overrides the session vault. This adds necessary semantic meaning for correct invocation.

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?

Description explicitly states the tool returns notes with zero incoming and zero outgoing links, using specific verb+resource+scope. It distinguishes from siblings like links.hubs and links.broken.

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?

Provides explicit usage context: 'Useful for cleanup passes' and suggests pairing with sibling tools in a weekly routine. Also clarifies vault selection behavior with vaultPath.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bezata/kObsidian'

If you have feedback or need assistance with the MCP directory API, please join our Discord server