Skip to main content
Glama
FOX2920

WeWork MCP Server

by FOX2920

find_project_by_name

Search for WeWork projects by name using similarity matching to find the most relevant project information based on specified thresholds.

Instructions

Tìm dự án theo tên với độ tương đồng

Args:
    project_name: Tên dự án cần tìm
    threshold: Ngưỡng tương đồng tối thiểu (default: 0.3)

Returns:
    Thông tin dự án phù hợp nhất

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_nameYes
thresholdNo

Implementation Reference

  • The handler function decorated with @mcp.tool(), which defines and registers the MCP tool. It fetches all projects, finds the best fuzzy match by name using WeWorkClient's find_best_project_match method, and returns the matching project or a list of available projects if no match above threshold.
    @mcp.tool()
    def find_project_by_name(project_name: str, threshold: float = 0.3) -> Dict[str, Any]:
        """
        Tìm dự án theo tên với độ tương đồng
        
        Args:
            project_name: Tên dự án cần tìm
            threshold: Ngưỡng tương đồng tối thiểu (default: 0.3)
        
        Returns:
            Thông tin dự án phù hợp nhất
        """
        try:
            if not wework_client:
                return {'error': 'WeWork client not initialized'}
            
            logger.info(f"Finding project by name: {project_name}")
            projects = wework_client.fetch_projects()
            
            if not projects:
                return {
                    'error': 'No projects available or failed to fetch projects',
                    'success': False
                }
            
            best_project, similarity_score = wework_client.find_best_project_match(
                project_name, projects, threshold
            )
            
            if best_project:
                return {
                    'success': True,
                    'found': True,
                    'project': best_project,
                    'similarity_score': similarity_score,
                    'search_term': project_name
                }
            else:
                return {
                    'success': True,
                    'found': False,
                    'similarity_score': similarity_score,
                    'search_term': project_name,
                    'message': f'Không tìm thấy dự án phù hợp với "{project_name}" (ngưỡng: {threshold})',
                    'available_projects': [p.get('name', 'Unknown') for p in projects[:5]]  # Show first 5 for reference
                }
                
        except Exception as e:
            logger.error(f"Error in find_project_by_name: {e}")
            return {'error': str(e), 'success': False}
  • The @mcp.tool() decorator registers the find_project_by_name function as an MCP tool.
    @mcp.tool()
  • Function signature defines input schema (project_name: str, threshold: float=0.3) and output as Dict[str, Any]. Docstring provides additional description.
    def find_project_by_name(project_name: str, threshold: float = 0.3) -> Dict[str, Any]:
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 mentions the similarity matching mechanism and default threshold, which is useful. However, it doesn't describe critical behaviors: whether this is a read-only operation, what happens if no matches are found, how similarity is calculated, performance characteristics, or error conditions. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 appropriately concise and well-structured. It begins with a clear purpose statement, then uses labeled sections (Args, Returns) to organize parameter and return value information. Each sentence earns its place by providing essential information without redundancy. The bilingual presentation (Vietnamese/English) is efficient for parameter documentation.

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's moderate complexity (similarity-based search), no annotations, no output schema, and 2 parameters, the description is minimally adequate but has clear gaps. It covers the basic purpose and parameters well, but lacks information about return format, error handling, similarity algorithm details, and comparison with sibling tools. The absence of an output schema means the description should ideally explain what 'Thông tin dự án phù hợp nhất' (most suitable project information) contains, which it doesn't.

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?

The description adds meaningful semantic context for both parameters beyond what the schema provides. For 'project_name', it explains this is 'Tên dự án cần tìm' (name of project to find). For 'threshold', it provides crucial context: 'Ngưỡng tương đồng tối thiểu' (minimum similarity threshold) with a default value. Given the schema has 0% description coverage, the description compensates well by explaining what each parameter means in the context of similarity matching.

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 tool's purpose: 'Tìm dự án theo tên với độ tương đồng' (Find project by name with similarity). This specifies the verb (find), resource (project), and key mechanism (similarity matching). It distinguishes from siblings like 'get_project_details' (which likely retrieves specific project data) and 'search_projects' (which may have broader search capabilities), though the differentiation isn't explicitly stated.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'search_projects' or 'get_project_details', nor does it specify prerequisites or exclusions. The only implied usage is for finding projects by name with similarity matching, but this is essentially restating the purpose rather than providing contextual guidance.

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/FOX2920/Aplus-MCP'

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