Skip to main content
Glama

history_search

Search collaboration history records in Claude Team MCP to find past interactions and discussions using keywords.

Instructions

搜索协作历史记录

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes搜索关键词
limitNo返回记录数量,默认 10

Implementation Reference

  • The main handler for the 'history_search' tool in the MCP server's CallToolRequestSchema request handler. Parses input arguments, invokes HistoryManager.search, and returns formatted results or no-results message.
    case 'history_search': { const { query, limit } = args as { query: string; limit?: number }; const results = historyManager.search(query, limit || 10); return { content: [ { type: 'text', text: results.length > 0 ? historyManager.formatList(results) : `未找到包含 "${query}" 的协作记录`, }, ], }; }
  • src/server.ts:228-245 (registration)
    Tool registration in the ListToolsRequestSchema handler's tools array, defining name, description, and input schema for 'history_search'.
    { name: 'history_search', description: '搜索协作历史记录', inputSchema: { type: 'object', properties: { query: { type: 'string', description: '搜索关键词', }, limit: { type: 'number', description: '返回记录数量,默认 10', }, }, required: ['query'], }, },
  • The core search implementation in HistoryManager class. Retrieves up to 100 recent summaries, filters case-insensitively by query matching task or summary, and applies limit.
    search(query: string, limit = 10): HistorySummary[] { const allEntries = this.list(100); const lowerQuery = query.toLowerCase(); return allEntries .filter( (entry) => entry.task.toLowerCase().includes(lowerQuery) || entry.summary.toLowerCase().includes(lowerQuery) ) .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/7836246/claude-team-mcp'

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