Skip to main content
Glama
Flux-Frontiers

SwiftKG MCP Server

explain

Explain a specific code node by ID, revealing its purpose, source location, callers, and callees in a markdown summary. Ideal for understanding a function's role and context without reading full source.

Instructions

Return a natural-language explanation of a code node.

Given a node ID (e.g., meth:Sources/Networking/Client.swift:HTTPClient.send), returns a markdown-formatted explanation that includes:

  • What it is: The node's kind, short description from its doc-comment

  • Where it lives: Module path and source location

  • What calls it: The callers (reverse call graph)

  • What it calls: The callees (functions/methods this node invokes)

  • Documentation: Full doc-comment if available

This is ideal for understanding the role and context of a specific node without needing to read the full source code. Use pack_snippets() to then retrieve the actual implementation.

:param node_id: Stable node identifier, e.g. meth:Sources/Networking/Client.swift:HTTPClient.send. :param limit: Maximum callers and callees to list (default 10). Pass 0 to list all. :return: Markdown-formatted explanation ready for LLM consumption.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
node_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly describes the output format (markdown, LLM-ready), the included sections, and how limit behaves. It does not explicitly state read-only/no side effects, but the described behavior strongly implies a pure retrieval operation.

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 description is moderately long but front-loads the core purpose and uses a bullet list for the return sections. Every bullet adds value, and the param/return lines mirror typical docstrings without redundancy. A couple of sentences could be tightened, but it remains efficient.

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?

Given the simple input schema and existing output-schema coverage, the description is nearly complete: it explains the use case, both parameters, and the output content. It omits only error behavior for invalid node IDs, which is minor for this tool class and not a blocker for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates: node_id is explained with a concrete example and format, and limit is defined with both its default and the special 0 value. This is exactly the semantic content an agent needs beyond the bare 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?

The description states a specific verb ('Return a natural-language explanation') and a specific resource ('a code node'), and the bullet points differentiate it from callers/get_node by showing it aggregates kind, location, call graph, and documentation. The example node ID makes the scope concrete.

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?

It explicitly says this is ideal for understanding a node's role and context without reading source, and it names pack_snippets() as the follow-up tool to retrieve implementation. It does not explicitly mention alternatives like callers or get_node for narrower queries, but enough guidance is present to route an agent.

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