Skip to main content
Glama

MCP-TY

基于 ty 类型检查器的 MCP 服务器,为 AI 提供精确的 Python 代码语义分析能力。

为什么选择 ty?

  • 极速:基于 Rust 的增量分析(Salsa 架构),毫秒级响应

  • 低内存:可同时分析多个项目而不会撑爆内存

  • 精准:语义级别的代码理解,而不是简单的文本搜索

  • 与 uv 集成:自动识别虚拟环境和依赖

Related MCP server: mcp-pyright

返回格式

所有工具返回 JSON 格式的结构化数据:

// 成功
{"status": "ok", "data": {...}}

// 错误
{"status": "error", "message": "..."}

// 未找到
{"status": "not_found", "message": "..."}

功能特性

符号搜索工具(替代原生搜索)

工具

功能

LSP 接口

search_symbol

关键词搜索符号,返回文件名+行号

workspace/symbol

list_file_symbols

列出文件中的所有符号结构

textDocument/documentSymbol

精确定位工具

工具

功能

LSP 接口

start_project

初始化项目分析

initialize

get_definition

跳转到符号定义

textDocument/definition

find_usages

查找所有引用

textDocument/references

get_type_info

获取类型信息

textDocument/hover

get_diagnostics

获取类型错误

textDocument/publishDiagnostics

get_completions

代码补全建议

textDocument/completion

analyze_file

文件综合分析

多个接口组合

代码编辑工具

工具

功能

LSP 接口

safe_rename

跨文件安全重命名符号

textDocument/rename

get_code_actions

获取可用的快速修复

textDocument/codeAction

apply_code_action

应用指定的代码操作

textDocument/codeAction

get_edit_preview

预览代码修改内容

textDocument/codeAction

为什么代码编辑功能很重要?

传统 AI 修改代码的方式是"生成新代码",这容易产生幻觉或遗漏。 而基于 ty 的编辑是语义级精确计算

AI 发指令 → ty 分析类型系统 → 计算精确的 diff → 应用修改

这种方式的优势:

  • 重命名时找到所有真实引用,不会漏改或错改

  • 自动修复知道如何添加正确的 import

  • 修改是可预览的,AI 可以先看再决定是否应用

安装

前置条件

确保已安装 ty

# 使用 uv 安装
uv tool install ty

# 或使用 pipx
pipx install ty

安装 mcp-ty

# 克隆项目
git clone https://github.com/yourusername/mcp-ty.git
cd mcp-ty

# 使用 uv 安装
uv sync

配置

Cursor 配置

在 Cursor 的 MCP 配置文件中添加:

{
  "mcpServers": {
    "ty-context-engine": {
      "command": "uv",
      "args": [
        "--directory",
        "D:/PythonProjectAll/mcp-ty",
        "run",
        "mcp-ty"
      ]
    }
  }
}

Claude Desktop 配置

编辑 claude_desktop_config.json

{
  "mcpServers": {
    "ty-context-engine": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-ty",
        "run",
        "mcp-ty"
      ]
    }
  }
}

使用示例

1. 初始化项目

首先,让 AI 初始化要分析的项目:

请初始化项目 D:/MyPythonProject 进行类型分析

AI 会调用 start_project 工具。

2. 跳转到定义

在 src/models/user.py 的第 45 行第 10 列,帮我找到这个函数的定义

3. 查找所有引用

找出 User 类在整个项目中的所有使用位置

4. 获取类型信息

告诉我 src/services/auth.py 第 23 行的 session 变量是什么类型

5. 检查类型错误

检查 src/api/routes.py 有没有类型错误

架构说明

┌─────────────┐     stdio      ┌─────────────┐     JSON-RPC     ┌─────────┐
│  AI Client  │ ◄────────────► │  MCP Server │ ◄───────────────► │   ty    │
│  (Cursor)   │                │  (FastMCP)  │                   │ server  │
└─────────────┘                └─────────────┘                   └─────────┘
  • AI Client:Cursor、Claude Desktop 等支持 MCP 的 AI 客户端

  • MCP Server:本项目,作为桥梁连接 AI 和 ty

  • ty server:Astral 开发的高性能 Python 类型检查器 LSP 服务

与传统搜索的区别

场景

grep/文本搜索

ty 语义分析

搜索 User

返回几千个匹配

只返回 class User 的定义

查找方法调用

可能匹配注释和字符串

只匹配真正的方法调用

理解类型

无法推断

精确显示推断类型

重构安全性

容易改错

找到所有真实引用

局限性

ty 提供的是代码结构语义,不是自然语言语义

  • 能做:找到 process_order 函数的所有调用链

  • 不能做:理解"帮我找处理退款的代码"(除非函数名就叫退款)

建议:将 ty 的结构化检索与 RAG 向量搜索结合,是目前最强的 AI 代码理解方案。

开发

# 安装开发依赖
uv sync --dev

# 运行测试
uv run pytest

# 类型检查
uv run ty check

License

MIT

Available Tools

16 tools
analyze_fileC

Analyze a Python file: get structure and diagnostics summary.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for safety disclosure but fails to indicate whether this is read-only, destructive, or has side effects. It mentions the output ('structure and diagnostics') but this is redundant with the output schema's presumed existence.

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?

Extremely concise at one sentence with no redundancy, though arguably too terse given the need to compensate for zero annotation coverage and poor schema documentation.

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

Completeness2/5

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

Despite having an output schema (reducing the need to describe return values), the description is incomplete given the high sibling ambiguity and 0% schema coverage. It fails to clarify the analysis scope or differentiate from overlapping tools like get_code_actions.

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

Parameters2/5

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

Schema description coverage is 0%, requiring the description to compensate for the lack of parameter documentation. The description implies file_path refers to a 'Python file' but provides no details on path format (absolute vs relative), validation requirements, or examples.

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?

Clearly states the action ('analyze') and target ('Python file'), and specifies distinct outputs ('structure and diagnostics') that distinguish it from siblings like get_diagnostics (likely diagnostics-only) and list_file_symbols (structure-only).

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives like get_diagnostics or read_code, nor does it mention prerequisites such as file existence or project context.

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

apply_code_actionC

Apply a code action by index (from get_code_actions).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes
action_indexYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/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 fails to state that this operation likely modifies the filesystem, whether it requires the file to be saved first, or what happens if the action_index is invalid. 'Apply' implies mutation but doesn't confirm safety or reversibility.

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 single sentence is efficiently structured with zero redundant words. However, given the complete absence of schema descriptions, this extreme brevity is inadequate rather than optimal—it sacrifices necessary parameter documentation for terseness.

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

Completeness2/5

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

The tool has 4 undocumented parameters (0% schema coverage), no annotations, and likely complex IDE-side effects. While an output schema exists (reducing the description's burden for return values), the description is insufficient for parameter comprehension and operational context.

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

Parameters2/5

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

Schema description coverage is 0% (titles only, no descriptions). While the description mentions 'by index' (relating to action_index), it provides no semantic context for the other three required parameters (file_path, line, column) or their relationship to the code action resolution context.

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 a specific verb ('Apply') and resource ('code action') and clearly indicates the mechanism ('by index'). The parenthetical reference to 'get_code_actions' effectively distinguishes this from its sibling tool, clarifying this is the execution step while get_code_actions is the retrieval step.

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 parenthetical '(from get_code_actions)' implies a workflow dependency, suggesting this tool consumes indices from that sibling. However, it lacks explicit guidance on prerequisites (e.g., 'Call get_code_actions first') or when to use alternatives like get_edit_preview instead.

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

find_usagesB

Find all references to symbol at position (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It successfully discloses the 1-based indexing behavior for coordinates. However, it omits whether results include the definition site, performance characteristics, or error behaviors.

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?

Single sentence with no redundancy. However, given the 0% schema coverage and lack of annotations, it is arguably too terse and front-loads insufficient context for safe invocation.

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?

Having an output schema reduces the burden on description to explain return values. The coordinate system is specified (1-based), but with zero schema descriptions and no annotations, the description should have explicitly mapped the three required parameters.

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

Parameters2/5

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

Schema coverage is 0% with no descriptions on file_path, line, or column. The description mentions 'position' which implicitly maps to line/column, but fails to explicitly document the 'file_path' parameter or clarify that line/column are 1-based integers.

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?

Clear verb 'Find' and resource 'references to symbol' distinguishes from siblings like 'get_definition' (which gets the definition) and 'search_symbol' (which searches by name). The '1-based' qualifier adds specific technical scope.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this versus 'get_definition' or 'search_symbol'. No prerequisites or constraints mentioned (e.g., project must be started first).

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

get_code_actionsB

Get available quick fixes and refactorings at position (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. Adds critical '1-based' indexing note for line/column parameters. However, fails to indicate this is read-only (safe to call), whether it requires an active project (implied by siblings), or the nature of the returned action objects.

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?

Single sentence, front-loaded with verb, no unnecessary words. However, brevity comes at cost of missing necessary behavioral and usage context, suggesting it is under-sized for the tool's complexity rather than optimally concise.

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

Completeness2/5

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

Despite having an output schema (reducing description burden for return values), the description inadequately covers the 0% schema-described parameters and fails to establish the critical sibling workflow (get_code_actions → apply_code_action). Lacks completeness expected for a 3-parameter LSP-like tool with no safety annotations.

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 has 0% description coverage. Description implies line/column via 'position' and adds the '1-based' constraint, but completely omits file_path semantics (e.g., absolute vs relative path requirements). Provides partial compensation for the schema gap.

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?

Clear verb ('Get') and resource ('quick fixes and refactorings'), with scope ('at position'). Distinguishes from get_diagnostics (which gets problems, not fixes) by nature of the return value, but does not explicitly clarify the workflow relationship with sibling apply_code_action.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings, or that it should typically be invoked after get_diagnostics when fixes are available. Missing explicit note that apply_code_action must be called separately to execute any returned actions.

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

get_completionsB

Get code completion suggestions at position (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It successfully specifies the 1-based indexing system (critical for correct invocation), but omits other behavioral traits like return format, caching behavior, or side effects.

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?

Extremely concise with zero wasted words. However, given the lack of annotations and schema descriptions, this brevity becomes a limitation rather than a virtue, as critical context is omitted for the sake of terseness.

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?

Provides the minimum viable context for correct invocation (the 1-based coordinate specification), which prevents off-by-one errors. However, it lacks usage guidance and does not compensate adequately for zero schema annotation coverage across three required parameters.

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 0%, requiring the description to compensate. It partially does so by clarifying that line/column form a 'position' and specifying 1-based indexing, but fails to describe file_path semantics or provide detailed constraints for the parameters.

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?

States a specific action (Get code completion suggestions) and scope (at position). The inclusion of '1-based' distinguishes coordinate expectations. However, it does not explicitly differentiate from similar siblings like get_code_actions or get_definition.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives like get_code_actions or get_type_info, nor does it mention prerequisites such as the file needing to exist in the project.

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

get_definitionC

Go to definition of symbol at position (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations provided, so description carries full behavioral burden. 'Go to' implies navigation but MCP tools return data; description does not clarify what gets returned (location? source?) or behavior when symbol is not found or position is invalid.

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?

Single sentence efficiently front-loaded with the action. The '1-based' parenthetical is high-value information that earns its place. Slightly cryptic for novices, but appropriately sized for an IDE 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?

With 3 simple parameters and an existing output schema, the core operation is identifiable, but the 0% input schema coverage and lack of behavioral disclosure (error handling, file path format) leave notable gaps for reliable invocation.

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 coverage is 0%, requiring description compensation. It adds crucial semantics that line/column are '1-based' (avoiding off-by-one errors), but fails to document file_path expectations (absolute path? URI? extension required?). Minimal compensation for the schema gap.

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?

Clear verb phrase 'Go to definition' identifies the LSP operation, and 'at position' scopes it to coordinate-based lookup. However, it does not distinguish from sibling get_type_info (which also uses position) or clarify when to use this versus search_symbol.

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

Usage Guidelines2/5

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

Provides only the coordinate system constraint '(1-based)'. No guidance on when to use this over find_usages or search_symbol, no mention of file_path format requirements (absolute vs relative), and no error conditions.

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

get_diagnosticsB

Get type errors and warnings for a file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/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 full disclosure burden. While 'Get' implies read-only behavior, the description fails to mention project context requirements (critical given 'start_project'/'stop_project' siblings), whether the file must be saved, or if this triggers a compilation/check.

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?

Single sentence front-loaded with the verb 'Get'. No redundant words; 'type errors and warnings' efficiently specifies the diagnostic scope. Appropriate length for the tool's simplicity.

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?

Sufficient for a single-parameter read operation with an output schema present (so return values need not be described). However, lacks critical contextual information about project lifecycle dependencies given the sibling tool ecosystem.

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 coverage is 0% with no property descriptions. The description mentions 'for a file' which loosely maps to the 'file_path' parameter, providing minimal semantic context, but does not specify path format requirements (absolute vs relative), file existence requirements, or supported file types.

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 clear action ('Get') and specific artifacts ('type errors and warnings') for a defined resource ('a file'). However, it does not distinguish from siblings like 'analyze_file' or 'get_type_info' that 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 Guidelines2/5

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

No guidance provided on when to prefer this over 'analyze_file', 'get_code_actions', or 'get_type_info'. No mention of prerequisites like requiring 'start_project' to be called first given the presence of project lifecycle siblings.

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

get_edit_previewC

Preview changes a code action would make.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes
action_indexYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/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. While 'preview' implies a read-only operation, the description fails to specify what the output contains (e.g., diff format, edit ranges, full file content) or error conditions when invalid coordinates are supplied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is efficient and front-loaded, but the tool is underspecified for its complexity. With zero schema descriptions and no annotations, the brevity represents under-documentation rather than effective conciseness.

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

Completeness2/5

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

Given four required parameters with zero schema coverage and no annotations, the description is inadequate. While an output schema exists (reducing the need to describe returns), the complete absence of parameter semantics and workflow context leaves critical gaps.

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

Parameters1/5

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

Schema coverage is 0% and the description completely omits any discussion of the four parameters. It does not explain that 'action_index' references a previous code action result, nor clarify coordinate systems (0-indexed vs 1-indexed) for line/column.

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 clearly states the core function using specific verb ('Preview') and resource ('changes'), and implicitly distinguishes itself from sibling 'apply_code_action' through the 'preview' semantics. However, it assumes familiarity with 'code action' terminology without defining it.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives, nor does it mention the prerequisite workflow (e.g., that 'action_index' must likely be obtained from 'get_code_actions' first). The user must infer usage from parameter names alone.

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

get_type_infoB

Get type information for symbol at position (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses the critical '1-based' indexing behavioral trait for the position parameters, but omits read-only nature, error handling on invalid positions, and whether it works for all symbol types.

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?

Single sentence is appropriately front-loaded and efficient. However, extreme brevity comes at the cost of usage context and parameter documentation; one additional sentence would improve utility without sacrificing clarity.

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?

With output schema present, omitting return value description is acceptable. However, given 0% schema coverage and numerous sibling tools, the description should provide more context about parameters and usage scenarios to be complete.

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

Parameters2/5

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

Schema has 0% description coverage (only titles). Description mentions 'position (1-based)' which adds semantic value for line/column parameters but fails to describe 'file_path' or coordinate format expectations, leaving significant gaps uncovered.

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 clearly states the action ('Get'), resource ('type information'), and target ('symbol at position'). It distinguishes from siblings like 'get_definition' (location vs type) and 'find_usages' (references vs type), though could more explicitly contrast with 'analyze_file'.

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

Usage Guidelines2/5

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

No guidance provided on when to prefer this over 'get_definition' or 'analyze_file', or when type information might be unavailable. No prerequisites mentioned (e.g., project must be started).

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

list_file_symbolsC

List all symbols defined in a file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. While 'List' implies a read-only operation, the description omits what constitutes a 'symbol' (classes, functions, variables), the output format, and whether the operation is expensive or cached. It mentions an output schema exists but adds no context about what it contains.

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?

Extremely brief at 7 words. While appropriately front-loaded, it's arguably too terse given the lack of schema documentation and annotations. However, no words are wasted, and the structure is efficient.

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?

Minimally viable for a single-parameter tool with an output schema. The description covers the basic operation but leaves significant gaps regarding symbol types, output structure, and sibling differentiation that would help an agent invoke it correctly versus alternatives.

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

Parameters2/5

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

Schema description coverage is 0% with no parameter descriptions. The description mentions 'in a file' which implies the file_path parameter, but provides no semantic details: whether paths should be absolute or relative, supported languages/file types, or error behavior when files don't exist. Insufficient compensation for zero 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 provides a clear verb (List), resource (symbols), and scope (defined in a file). However, it fails to differentiate from sibling symbol-related tools like 'search_symbol', 'get_definition', or 'find_usages', which all interact with code symbols in different ways.

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

Usage Guidelines2/5

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

No guidance provided on when to use this tool versus alternatives. Given siblings like 'search_symbol' (cross-file search) and 'get_definition' (specific symbol lookup), the description should clarify that this enumerates all symbols within a single specified file.

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

read_codeB

Read file content, optionally by line range (1-based).

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
start_lineNo
end_lineNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. Adds critical behavioral detail '1-based' indexing for line ranges (essential for correctness), but omits error handling (missing files, invalid ranges), output format, and auth requirements.

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?

Single sentence, 9 words. Main action front-loaded, modifiers follow. Both 'optionally' and '1-based' are essential information; zero waste.

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?

Has output schema (covering return values) and simple functionality. Given 0% schema coverage and no annotations, the 1-based indexing detail is the minimal necessary addition. Adequate but could include file existence or range validation behavior.

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 has 0% description coverage (titles only). Description compensates partially by explaining 'line range' semantics and the '1-based' indexing for start_line/end_line, but does not describe file_path constraints or interaction between range parameters (e.g., can provide only start_line?).

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?

Clear verb 'Read' and resource 'file content', with specific scope detail about line ranges. Distinguishes from write-oriented siblings (apply_code_action, safe_rename) implicitly via 'Read', though does not explicitly differentiate from read_context.

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

Usage Guidelines2/5

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

No explicit guidance on when to use versus siblings like read_context or analyze_file. Only mentions that line ranges are optional, which implies usage but does not constitute explicit when-to-use guidance.

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

read_contextC

Read code around a specific line with context.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
contextNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.3/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 full disclosure burden. While it mentions 'context', it fails to explain that this refers to line count, doesn't describe return format despite output schema existing, and omits error handling (e.g., invalid line numbers).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single 9-word sentence is excessively terse given the lack of schema descriptions and annotations. Under-specification masquerading as conciseness; fails to front-load critical distinctions from siblings.

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

Completeness2/5

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

Inadequate for a 3-parameter tool with 0% schema coverage and no annotations. Missing sibling differentiation, parameter details, and behavioral expectations despite having an output schema that could have been referenced.

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

Parameters2/5

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

Schema coverage is 0%, requiring the description to compensate. It mentions 'context' conceptually but does not explain that the `context` parameter specifies the number of surrounding lines, or that it defaults to 10. `file_path` and `line` are implied but not clarified.

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

Purpose3/5

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

States the core action (read code) and scope (around a specific line), but fails to differentiate from sibling tool `read_code`, leaving ambiguity about when to use this versus the general file reader.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives like `read_code` or `get_definition`, and mentions no prerequisites or error conditions.

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

safe_renameB

Rename symbol across project. Set apply=True to execute.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYes
lineYes
columnYes
new_nameYes
applyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
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 effectively communicates the dry-run behavior (requiring apply=True to execute), but fails to explain what 'safe' implies (atomicity, reversibility, conflict detection) or what the output contains when previewing vs applying.

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 extremely concise with two short sentences and zero redundancy. The information is front-loaded with the action first. However, given the complexity (5 parameters, 0% schema coverage), this brevity crosses into under-specification.

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

Completeness2/5

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

Given five parameters with zero schema descriptions and no annotations, the description is insufficient. It documents only one optional parameter (apply) while leaving four required parameters (file_path, line, column, new_name) undocumented, creating major operational gaps for an agent attempting to invoke the tool.

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

Parameters2/5

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

Schema description coverage is 0%, requiring the description to compensate. While it clarifies the 'apply' parameter's purpose (execution toggle), it completely omits semantic context for the other four parameters (file_path, line, column, new_name), leaving critical required inputs undocumented.

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 a specific verb ('Rename') and clear resource scope ('symbol across project'), accurately conveying the tool's purpose. However, it does not explicitly differentiate this tool from siblings like 'apply_code_action' or 'get_edit_preview' that might also perform refactoring operations.

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 critical guidance that 'apply=True' is required to execute, revealing a dry-run vs execution pattern. However, it lacks explicit guidance on when to choose this tool over alternatives like 'apply_code_action' or prerequisites such as ensuring the file exists in the project.

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

search_symbolC

Search symbols (classes, functions, variables) across the project.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. While 'across the project' establishes scope, description omits critical behavioral details: matching logic (substring vs. exact vs. fuzzy), case sensitivity, and result ranking. Output schema exists but search semantics remain undefined.

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?

Single efficient sentence with action front-loaded. No redundant words. However, extreme brevity contributes to informational gaps given the tool's complexity and lack of structured metadata.

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

Completeness2/5

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

Inadequate for a code navigation tool with 0% parameter schema coverage and numerous siblings. Missing: search syntax rules, relationship to other navigation tools, and performance expectations (e.g., large project implications).

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

Parameters2/5

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

Schema coverage is 0% (query parameter undocumented). Description provides context that query searches symbols, but fails to describe expected format (identifier rules, wildcards, case sensitivity) or give examples, leaving the parameter semantics largely unspecified.

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?

Clear specific verb 'Search' with concrete resource examples (classes, functions, variables) and explicit scope 'across the project'. However, lacks explicit differentiation from siblings like list_file_symbols or get_definition.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives such as list_file_symbols (file-specific) or get_definition (precise lookup). No mention of prerequisites or search prerequisites.

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

start_projectB

Initialize ty for a Python project. Must be called first.

ParametersJSON Schema
NameRequiredDescriptionDefault
project_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. States initialization occurs but fails to describe side effects (what files/state are created), idempotency (safe to call twice?), or teardown implications (relation to stop_project). With output schema existing, description omits what successful initialization returns.

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?

Extremely brief (two sentences) with critical constraint ('Must be called first') front-loaded appropriately. No redundant phrases. Minor deduction because 'ty' appears to be either a typo or unexplained jargon, slightly reducing information density.

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?

Adequate minimum for a session initialization tool with existing output schema (return values need not be described). However, given zero parameter documentation and missing behavioral details (what 'ty' represents, initialization side effects), the description leaves significant gaps for an agent attempting to use this correctly without trial-and-error.

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

Parameters2/5

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

Schema coverage is 0% (project_path lacks description), and description fails to compensate. While 'project_path' is somewhat self-documenting by name, the description does not specify if this should be a directory path, absolute vs. relative, or what project structure is expected. Parameter documentation gap remains unaddressed.

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

Purpose3/5

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

States specific verb (Initialize) and resource (Python project), but the reference to 'ty' is unexplained and ambiguous—potentially a typo for 'the' or an obscure product name. Distinguishes from analysis-oriented siblings by identifying itself as project setup, but the cryptic 'ty' damages clarity.

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?

Provides explicit sequencing guidance with 'Must be called first,' which is critical prerequisite information for an agent. However, lacks guidance on when NOT to use it (e.g., if project is already initialized) or alternatives to restarting.

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

stop_projectC

Stop ty and release resources.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.3/5.0
Behavior2/5

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

With no annotations provided, the description must carry full behavioral disclosure but only mentions 'release resources'. It lacks critical details: whether shutdown is graceful or forced, whether state/data is persisted, cleanup scopes, or the return value structure (despite having an output schema).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely terse (single fragmented sentence), which would be acceptable if accurate, but contains the typo 'ty' that undermines clarity. Every word should earn its place; here 'ty' wastes the agent's interpretive effort.

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

Completeness2/5

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

Given the tool has 0 parameters and an existing output schema, the burden is low, but the description fails to adequately explain what 'ty' refers to or the nature of the stopping operation. For a lifecycle operation (see sibling start_project), the ambiguity is insufficient.

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?

Input schema has zero parameters. Per rubric baseline for 0 params is 4. No parameters require semantic elaboration.

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

Purpose2/5

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

The description contains a critical typo ('Stop ty' instead of likely 'Stop the project'), making the actual target ambiguous. While 'release resources' adds some context, the core object of the action is unclear, forcing the user to infer from the tool name and sibling 'start_project'.

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

Usage Guidelines2/5

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

No guidance provided on when to invoke this tool versus alternatives, nor prerequisites for use. The sibling 'start_project' exists but is not referenced to clarify the workflow relationship.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 16 tool updatesv0.1.0
    • First observedanalyze_file
    • First observedapply_code_action
    • First observedfind_usages
    • First observedget_code_actions
    • First observedget_completions
    • First observedget_definition
    • First observedget_diagnostics
    • First observedget_edit_preview
    • First observedget_type_info
    • First observedlist_file_symbols
    • First observedread_code
    • First observedread_context
    • First observedsafe_rename
    • First observedsearch_symbol
    • First observedstart_project
    • First observedstop_project

TDQS

B3.3/5.0

Scored across 16 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: analyze_file examines structure, get_completions provides suggestions, safe_rename handles renaming, etc. The descriptions make it easy to differentiate between analysis, navigation, editing, and project management functions.

Naming Consistency5/5

All tools follow a consistent verb_noun or verb_noun_noun pattern (e.g., analyze_file, get_completions, safe_rename). The naming is uniform throughout, using snake_case exclusively with clear action-oriented verbs like get, find, apply, and list.

Tool Count4/5

With 16 tools, the count is slightly high but reasonable for a comprehensive Python code analysis server. It covers diagnostics, navigation, refactoring, and project setup, though it might benefit from slight consolidation in areas like read_code and read_context.

Completeness5/5

The toolset provides complete coverage for Python code analysis and editing: it includes project initialization (start_project), file reading (read_code), diagnostics (get_diagnostics), navigation (get_definition, find_usages), refactoring (safe_rename, apply_code_action), and cleanup (stop_project). No obvious gaps exist for its intended domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that exposes Pyright language server functionality for Python, providing tools for type checking, code completions, and finding definitions. It enables AI models to perform static analysis and code formatting through the Model Context Protocol.
    7
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A production-ready MCP server that enables AI assistants to intelligently understand, analyze, edit, navigate, and review software projects with multi-workspace support, Git integration, and semantic search.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server that gives AI coding agents codebase navigation intelligence, enabling symbol lookup, reference finding, type inspection, and diagnostics through tools like locate, refs, hover, diagnostics, status, and rename.
    598
    MIT

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/qinsehm1128/mcp-ty'

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