Skip to main content
Glama
Unified MCP Server

Unified MCP Server

by qingyunyupan

code_complete

Completes unfinished Python or JavaScript code by using context and code intent to generate follow-up code for function and logic completion.

Instructions

智能补全未完成的代码,根据上下文和代码意图生成后续代码。适用于函数补全、逻辑补全等场景。

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>",
      "language": "<language>"
    },
    "name": "code_complete"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes未完成的代码
contextNo额外的上下文信息(可选)
languageYes代码语言

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says the output is generated code derived from context, but it never states whether the result is returned as a suggestion or written anywhere, what the output shape is, or any limits on input size. For a tool with zero annotation coverage this leaves real gaps.

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?

Two compact sentences, front-loading the core action before the applicable scenarios, with no filler. It could have spent one clause on how the output is consumed, but nothing present is wasted.

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 three-parameter generation tool with no output schema and full schema documentation, the description covers the essential purpose. It remains thin on whether the returned code is applied or just suggested, which matters for an agent deciding how to use the result.

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 documented including the language enum, so the schema does the heavy lifting. The description adds no extra meaning about how 'context' should be used or how the language choice affects behavior, which is the baseline 3 for high schema coverage.

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 states a specific verb and resource: it intelligently completes unfinished code by generating subsequent code from context and intent. That is concrete enough that an agent knows what the tool returns. It does not, however, distinguish itself from close siblings such as code_generate or code_improve, so a 4 rather than a 5.

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?

It names two intended scenarios, function completion and logic completion, which implies when to reach for it. It gives no explicit exclusions or pointers to alternatives like code_generate, so the agent must still infer the boundary between 'complete existing code' and 'generate new code'.

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