Skip to main content
Glama

semantic_diff

Compare graph-stored metadata properties between two code elements. Identify changed property keys and properties unique to each element using their element IDs.

Instructions

Compare graph-stored metadata properties between two code elements. Requires elementId1 and elementId2 — use the id fields from graph_query or code_explain results (not symbol names). Returns changed property keys and left/right-only properties. Note: compares graph metadata, not source-code semantics or embedding similarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementId1YesFirst code element ID
elementId2YesSecond code element ID
profileNoResponse profilecompact
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the tool compares graph metadata and not source-code semantics or embedding similarity, and it describes the return format (changed property keys and left/right-only properties). However, it does not explicitly state whether the tool is read-only, has side effects, or requires authentication. The behavioral context is adequate but incomplete.

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?

The description is three sentences long, front-loaded with the primary purpose, followed by usage guidance and a clarifying note. Every sentence adds value; there is no redundancy or unnecessary information. It is highly concise and well-structured.

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 tool has three parameters, no output schema, and no nested objects, the description covers the essential: purpose, parameter source, and return type. It explains what the tool does, how to input, and what to expect. However, it does not describe the output structure in detail (e.g., format of property keys), which would be helpful but is not critical given the tool's simplicity.

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%—all three parameters have descriptions. The description adds crucial context beyond the schema: it explains that elementId1 and elementId2 should be from graph_query or code_explain results, not symbol names. This is a meaningful addition that helps the agent select correct values. The profile parameter is not elaborated, but the schema provides enum choices.

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 clearly states the tool's purpose: 'Compare graph-stored metadata properties between two code elements.' It specifies the resource (graph metadata), the verb (compare), and includes necessary context (requires element IDs from specific sources). This distinguishes it from sibling tools like diff_since (source code diff) and find_similar_code (embedding similarity).

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?

The description provides explicit guidance on how to obtain the required element IDs: 'use the id fields from graph_query or code_explain results (not symbol names).' It implies when to use (when comparing metadata properties) and implicitly distinguishes from sibling tools that handle source code diffs or similarity. However, it does not explicitly state when not to use this tool.

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/lexCoder2/lxDIG-MCP'

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