Skip to main content
Glama

asana_search_projects

Search Asana projects by name pattern within a workspace to find specific projects using regular expressions.

Instructions

Search for projects in Asana using name pattern matching

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace to search in
name_patternYesRegular expression pattern to match project names
archivedNoOnly return archived projects
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • The switch case handler that processes the tool call for 'asana_search_projects', destructures arguments (workspace, name_pattern, archived, opts), calls asanaClient.searchProjects, and returns the JSON stringified response.
    case "asana_search_projects": {
      const { workspace, name_pattern, archived = false, ...opts } = args;
      const response = await asanaClient.searchProjects(
        workspace,
        name_pattern,
        archived,
        opts
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the Tool specification including name, description, and inputSchema with properties for workspace (required), name_pattern (required), archived (optional boolean), and opt_fields (optional string).
    export const searchProjectsTool: Tool = {
      name: "asana_search_projects",
      description: "Search for projects in Asana using name pattern matching",
      inputSchema: {
        type: "object",
        properties: {
          workspace: {
            type: "string",
            description: "The workspace to search in"
          },
          name_pattern: {
            type: "string",
            description: "Regular expression pattern to match project names"
          },
          archived: {
            type: "boolean",
            description: "Only return archived projects",
            default: false
          },
          opt_fields: {
            type: "string",
            description: "Comma-separated list of optional fields to include"
          }
        },
        required: ["workspace", "name_pattern"]
      }
    };
  • Registers searchProjectsTool (line 40) in the all_tools array, which is used to generate the list_of_tools exported for MCP tool discovery.
    const all_tools: Tool[] = [
      listWorkspacesTool,
      searchProjectsTool,
      searchTasksTool,
      getTaskTool,
      createTaskTool,
      getStoriesForTaskTool,
      updateTaskTool,
      getProjectTool,
      getProjectTaskCountsTool,
      getProjectSectionsTool,
      createTaskStoryTool,
      addTaskDependenciesTool,
      addTaskDependentsTool,
      createSubtaskTool,
      getMultipleTasksByGidTool,
      getProjectStatusTool,
      getProjectStatusesForProjectTool,
      createProjectStatusTool,
      deleteProjectStatusTool,
      setParentForTaskTool,
      getTasksForTagTool,
      getTagsForWorkspaceTool,
    ];
  • Core implementation: Calls Asana API to get projects in workspace (with archived filter and opts), creates case-insensitive RegExp from namePattern, filters projects by matching name, returns filtered list.
    async searchProjects(workspace: string, namePattern: string, archived: boolean = false, opts: any = {}) {
      const response = await this.projects.getProjectsForWorkspace(workspace, {
        archived,
        ...opts
      });
      const pattern = new RegExp(namePattern, 'i');
      return response.data.filter((project: any) => pattern.test(project.name));
    }
  • Includes 'asana_search_projects' (line 66) in READ_ONLY_TOOLS array, used to filter available tools when READ_ONLY_MODE is enabled.
    const READ_ONLY_TOOLS = [
      'asana_list_workspaces',
      'asana_search_projects',
      'asana_search_tasks',
      'asana_get_task',
      'asana_get_task_stories',
      'asana_get_project',
      'asana_get_project_task_counts',
      'asana_get_project_status',
      'asana_get_project_statuses',
      'asana_get_project_sections',
      'asana_get_multiple_tasks_by_gid',
      'asana_get_tasks_for_tag',
      'asana_get_tags_for_workspace'
    ];
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'search' and 'pattern matching' but doesn't disclose critical traits like whether results are paginated, rate limits, authentication requirements, or what the output format looks like (especially important without 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.

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose and includes the key constraint (name pattern matching). Every element earns its place.

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?

For a search tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context (e.g., pagination, error handling), usage guidance relative to siblings, and any mention of output structure, leaving significant gaps for an AI agent.

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%, so the schema fully documents all 4 parameters. The description adds no additional parameter semantics beyond implying 'name_pattern' uses regular expressions (which is already in the schema). Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Search for projects') and resource ('in Asana') with the specific method 'using name pattern matching'. It distinguishes itself from siblings like 'asana_get_project' (singular retrieval) and 'asana_search_tasks' (different resource), but doesn't explicitly contrast with other project-related tools like 'asana_get_project_statuses'.

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 is provided. The description doesn't mention when to prefer this over 'asana_get_project' (for specific projects) or 'asana_list_workspaces' (for broader context), nor does it specify prerequisites like needing workspace access.

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/roychri/mcp-server-asana'

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