Skip to main content
Glama

start_project

Initialize a Python project with ty type checking to enable semantic code analysis, structural navigation, and accurate editing tools.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the 'start_project' MCP tool, which initializes the TyLspClient and starts the analysis for a given project path.
    async def start_project(project_path: str) -> str:
        """Initialize ty for a Python project. Must be called first."""
        global _lsp_client
    
        path = Path(project_path).resolve()
        if not path.exists():
            return _error(f"Path not found: {project_path}")
        if not path.is_dir():
            return _error(f"Not a directory: {project_path}")
    
        if _lsp_client is not None:
            try:
                await _lsp_client.stop()
            except Exception:
                pass
    
        try:
            _lsp_client = TyLspClient()
            await _lsp_client.start(path)
            return _ok({"path": str(path), "initialized": True})
        except Exception as e:
            _lsp_client = None
            logger.exception("Failed to start ty server")
            return _error(str(e))
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.

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

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