Skip to main content
Glama

Task Trellis MCP

appendObjectLog.ts1.27 kB
import { Repository } from "../../repositories"; export async function appendObjectLog( repository: Repository, id: string, contents: string, ): Promise<{ content: Array<{ type: string; text: string }> }> { try { // Load the existing object const existingObject = await repository.getObjectById(id); if (!existingObject) { return { content: [ { type: "text", text: `Error: Object with ID '${id}' not found`, }, ], }; } // Create updated object with new log entry appended const updatedObject = { ...existingObject, log: [...existingObject.log, contents], }; // Save the updated object await repository.saveObject(updatedObject); return { content: [ { type: "text", text: `Successfully appended to object log: ${JSON.stringify( { id, contents, totalLogEntries: updatedObject.log.length }, null, 2, )}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error appending to object log: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } }

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/langadventurellc/task-trellis-mcp'

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