Skip to main content
Glama

list_activity

Display recent project activity feed from Codecks to track updates, manage workflows, and monitor team progress.

Instructions

Show recent activity feed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Tool registration with schema definition. The list_activity tool is registered with title 'List Activity', description, and input schema (z.object with limit parameter default 20). This includes both the registration metadata and the handler function that executes the tool logic.
    server.registerTool( "list_activity", { title: "List Activity", description: "Show recent activity feed.", inputSchema: z.object({ limit: z.number().default(20), }), }, async (args) => { try { const result = await client.listActivity(args.limit); return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(sanitizeActivity(result))), }, ], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } }, );
  • The actual handler function that executes when list_activity is called. It takes the limit argument, calls client.listActivity(), sanitizes the result with sanitizeActivity(), and returns the JSON-formatted response with error handling.
    async (args) => { try { const result = await client.listActivity(args.limit); return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(sanitizeActivity(result))), }, ], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } },
  • The client-side listActivity method that performs the actual GraphQL query. It queries the account's activityEntries with fields: id, type, createdAt, card (id, title), and user (name), then extracts and returns the entries list.
    async listActivity(limit = 20): Promise<Record<string, unknown>> { const result = await query({ _root: [ { account: [ { activityEntries: { _args: { limit }, _fields: ["id", "type", "createdAt", { card: ["id", "title"] }, { user: ["name"] }], }, }, ], }, ], }); return { entries: this.extractList(result, "activityEntries") }; }
  • The sanitizeActivity helper function that sanitizes activity data by applying tagUserText to card titles for security purposes, ensuring user-generated content is properly tagged.
    export function sanitizeActivity(data: Record<string, unknown>): Record<string, unknown> { const out = { ...data }; if (out.cards && typeof out.cards === "object" && !Array.isArray(out.cards)) { const cards = out.cards as Record<string, Record<string, unknown>>; const tagged: Record<string, Record<string, unknown>> = {}; for (const [id, card] of Object.entries(cards)) { const c = { ...card }; if (typeof c.title === "string") { c.title = tagUserText(c.title as string); } tagged[id] = c; } out.cards = tagged; } return out; }

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/rangogamedev/codecks-mcp'

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