Skip to main content
Glama
shareworker

@shareworker/code-review-mcp

Official
by shareworker

position_comment

Maps review comments to exact line numbers using text matching against diff hunks and fallback alignment. Requires path and comment text; supports optional code context and diff reference.

Instructions

Locate a comment to precise line numbers. Text matching primary (hunk new-side → old-side → full file), hunk alignment fallback. Pass diff_ref from get_review_targets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
repoNoRepo path, default: cwd
contentYesComment text
diff_refNoDefault HEAD; pass from get_review_targets
hint_lineNoRough line number from host LLM
existing_codeNoCode snippet the comment references
suggestion_codeNoSuggested fix code
Behavior3/5

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

The description explains the matching algorithm (text matching primary with hunk alignment fallback) and references another tool, giving some insight into behavior. However, with no annotations, it fails to disclose safety aspects (e.g., whether it is read-only or modifies state), which is important for an agent.

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 brief (two sentences) and front-loads the purpose. However, the second sentence is somewhat technical and could be simplified for broader understanding without losing meaning.

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?

Given the tool has 7 parameters, no output schema, and no annotations, the description covers the core positioning logic but omits details on error cases, prerequisites, and what the output looks like. It is adequate but not fully comprehensive.

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 86%, so most parameters are already documented in the schema. The description adds context only for 'diff_ref' by referencing its source. The parameter 'path' lacks a schema description, and the tool description does not compensate for that, leaving it partially unclear.

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 uses the verb 'locate' and specifies the resource 'comment' with the goal of precise line numbers, making the tool's primary function clear. However, it does not explicitly distinguish it from the sibling 'reflect_comment' tool, which may have overlapping functionality.

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?

The description provides a specific usage hint to 'Pass diff_ref from get_review_targets', which helps with integration. However, it does not specify when to use this tool versus alternatives like 'reflect_comment', nor does it give conditions for when not to use it.

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/shareworker/code-review'

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