Skip to main content
Glama
Proofessor MCP Server

Proofessor MCP Server

by mtuckerb

explain_code

Explains how a code snippet works by covering its purpose, logic flow, patterns, and design decisions, with optional focus on performance, security, or best practices.

Instructions

Request Proofessor to explain how specific code works, including its purpose, logic flow, patterns used, and design decisions.

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": {
      "code": "<code>"
    },
    "name": "explain_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code snippet to explain.
focusNoOptional: Specific aspect to focus on (e.g., 'performance', 'security', 'design patterns', 'best practices').
languageNoProgramming language of the code (e.g., 'javascript', 'python', 'typescript').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose what the response will contain (purpose, logic flow, patterns, design decisions), which is valuable since there is no output schema. However, it says nothing about cost, latency, limitations, or whether the code is sent to an external service, leaving the operational profile undocumented.

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?

A single front-loaded sentence with no wasted wording, and the scope of the explanation is stated up front. It is appropriately sized for a three-parameter read-style tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple analysis tool with a fully documented schema, the description covers what the tool does and what the answer will contain. It is missing operational context (no annotations, no output schema, no note on handling large code or unknown languages), which an agent would need for edge cases.

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 description coverage is 100%, with all three parameters (code, focus, language) documented in the schema itself, including an example-driven description of focus. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("explain how specific code works") and enumerates what the explanation covers: purpose, logic flow, patterns used, and design decisions. That makes it distinguishable in spirit from debug_help or best_practices, though it never explicitly contrasts itself with those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer it should call this when it wants code comprehension. There is no explicit when-to-use statement, no guidance on when a sibling like debug_help or analyze_architecture would be a better fit, and no prerequisites.

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