Skip to main content
Glama

searchProducts

Find products in ZenTao project management system by keyword to quickly locate relevant items for tracking and management tasks.

Instructions

Search products by keyword; returns a short list of products.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNoKeyword to match product name
limitNoMax items

Implementation Reference

  • Handler function that destructures arguments, calls the listProducts helper, and returns the products as JSON in the MCP response format.
    if (name === "searchProducts") { const { keyword, limit } = args; const products = await listProducts({ keyword, limit }); return { content: [ { type: "text", text: JSON.stringify({ products }, null, 2), }, ], }; }
  • Tool registration in the listTools response, including name, description, and input schema.
    { name: "searchProducts", description: "Search products by keyword; returns a short list of products.", inputSchema: { type: "object", properties: { keyword: { type: "string", description: "Keyword to match product name" }, limit: { type: "number", description: "Max items", default: 20 }, }, required: [], additionalProperties: false, }, }, {
  • Input schema defining parameters for keyword and optional limit.
    inputSchema: { type: "object", properties: { keyword: { type: "string", description: "Keyword to match product name" }, limit: { type: "number", description: "Max items", default: 20 }, }, required: [], additionalProperties: false, }, },
  • Core helper function that fetches products from ZenTao API, filters by keyword if provided, and limits results.
    async function listProducts({ keyword, limit = 20 } = {}) { const res = await callZenTao({ path: "products", query: { page: 1, limit, keywords: keyword }, }); const products = extractArray(res.data, ["products"]); const filtered = keyword ? products.filter((p) => `${p.name || ""}`.toLowerCase().includes(keyword.toLowerCase()) ) : products; return filtered.slice(0, limit); }

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