Skip to main content
Glama

listMyProjects

Retrieve projects from ZenTao where you're involved as PM, PO, QD, RD, or team member. Filter by name keyword and set item limits.

Instructions

List projects related to the current account (PM/PO/QD/RD/assigned/team).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoFilter by project name keyword
limitNoMax items

Implementation Reference

  • Registration of the 'listMyProjects' tool in the ListToolsRequestSchema response, including name, description, and input schema.
      name: "listMyProjects",
      description: "List projects related to the current account (PM/PO/QD/RD/assigned/team).",
      inputSchema: {
        type: "object",
        properties: {
          keyword: { type: "string", description: "Filter by project name keyword" },
          limit: { type: "number", description: "Max items", default: 50 },
        },
        required: [],
        additionalProperties: false,
      },
    },
  • Tool handler in CallToolRequestSchema: extracts arguments, calls listProjectsForAccount, and returns JSON response.
    if (name === "listMyProjects") {
      const { keyword, limit } = args;
      const projects = await listProjectsForAccount({ keyword, limit });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ projects }, null, 2),
          },
        ],
      };
    }
  • Main implementation logic: fetches projects via API, filters by keyword and current account involvement (roles/team), limits results.
    async function listProjectsForAccount({ keyword, limit = 50 } = {}) {
      const res = await callZenTao({
        path: "projects",
        query: { page: 1, limit },
      });
      const projects = extractArray(res.data, ["projects"]);
      const accountLower = (account || "").trim().toLowerCase();
      const filtered = projects.filter((p) => {
        const name = `${p.name || ""}`.toLowerCase();
        const matchKeyword = keyword ? name.includes(keyword.toLowerCase()) : true;
        if (!accountLower) return matchKeyword;
        const fields = [
          p.PM,
          p.PO,
          p.QD,
          p.RD,
          p.openedBy,
          p.lastEditedBy,
          p.assignedTo,
        ]
          .filter(Boolean)
          .map((v) => `${v}`.toLowerCase());
        const team = Array.isArray(p.teamMembers) ? p.teamMembers : [];
        const teamMatch = team.some((m) => `${m.account || m.name || ""}`.toLowerCase() === accountLower);
        const fieldMatch = fields.includes(accountLower);
        return matchKeyword && (teamMatch || fieldMatch);
      });
      return filtered.slice(0, limit);
    }
  • Helper function used by listProjectsForAccount to make authenticated API calls to ZenTao.
    async function callZenTao({
      path,
      method = "GET",
      query,
      body,
      headers = {},
      forceTokenRefresh = false,
    }) {
      assertConfig();
      const token = await fetchToken(forceTokenRefresh);
      const url = buildUrl(path, query);
      const res = await fetch(url, {
        method,
        headers: {
          "Content-Type": "application/json",
          Token: token,
          ...headers,
        },
        body: body ? JSON.stringify(body) : undefined,
      });
      const text = await res.text();
      const data = safeJson(text);
      if (!res.ok) {
        throw new Error(
          `Request failed ${res.status}: ${text || res.statusText || "unknown"}`
        );
      }
      return {
        status: res.status,
        headers: Object.fromEntries(res.headers.entries()),
        data: data ?? text,
      };
    }
  • Helper to extract array from API response (handles various nesting). Used in listProjectsForAccount.
    function extractArray(payload, keys = []) {
      if (Array.isArray(payload)) return payload;
      for (const key of keys) {
        if (Array.isArray(payload?.[key])) return payload[key];
      }
      if (Array.isArray(payload?.data)) return payload.data;
      return [];
    }
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 states the action ('List projects') but lacks details on permissions, rate limits, pagination, or output format. This is inadequate for a tool that likely involves data retrieval and filtering.

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 that front-loads the core purpose without unnecessary words. It directly communicates the tool's function and scope, making it easy to parse quickly.

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 no annotations and no output schema, the description is incomplete. It covers the basic purpose but lacks crucial behavioral context (e.g., how results are returned, error handling) and doesn't compensate for the absence of structured metadata, making it insufficient for reliable tool 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 description coverage is 100%, so the schema already documents both parameters ('keyword' for filtering by name and 'limit' for max items). The description adds no additional parameter semantics beyond what the schema provides, meeting the baseline 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 clearly states the verb ('List') and resource ('projects'), specifying they are 'related to the current account' with role-based context (PM/PO/QD/RD/assigned/team). This provides a specific scope, though it doesn't explicitly distinguish from sibling tools like 'searchProducts', which might overlap in 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 explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for listing account-related projects but doesn't mention when to choose this over sibling tools like 'searchProducts' or 'getMyBugs', leaving the agent without clear differentiation.

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/Valiant-Cat/zentao-mcp-server'

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