Skip to main content
Glama

twining_archive

Archive old blackboard entries by moving them to a file based on timestamp cutoff while preserving decision entries and optionally posting a summary.

Instructions

Archive old blackboard entries. Moves entries older than a cutoff timestamp to an archive file, preserving decision entries. Optionally posts a summary finding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
beforeNoISO timestamp cutoff — archive entries before this time (default: now)
keep_decisionsNoWhether to keep decision entries in the blackboard (default: true)
summarizeNoWhether to post a summary finding after archiving (default: true)

Implementation Reference

  • The handler for `twining_archive` which delegates to the `archiver` service.
      async (args) => {
        try {
          const result = await archiver.archive(args);
          return toolResult(result);
        } catch (e) {
          if (e instanceof TwiningError) {
            return toolError(e.message, e.code);
          }
          return toolError(
            e instanceof Error ? e.message : "Unknown error",
            "INTERNAL_ERROR",
          );
        }
      },
    );
  • Zod schema definition for `twining_archive` input parameters.
    inputSchema: {
      before: z
        .string()
        .refine((val) => !isNaN(Date.parse(val)), {
          message: "Must be a valid ISO 8601 timestamp",
        })
        .optional()
        .describe("ISO timestamp cutoff — archive entries before this time (default: now)"),
      keep_decisions: z
        .boolean()
        .optional()
        .describe("Whether to keep decision entries in the blackboard (default: true)"),
      summarize: z
        .boolean()
        .optional()
        .describe("Whether to post a summary finding after archiving (default: true)"),
    },
  • Registration of `twining_archive` tool in the MCP server.
    // twining_archive — Archive old blackboard entries
    server.registerTool(
      "twining_archive",
      {
        description:
          "Archive old blackboard entries. Moves entries older than a cutoff timestamp to an archive file, preserving decision entries. Optionally posts a summary finding.",
        inputSchema: {
          before: z
            .string()
            .refine((val) => !isNaN(Date.parse(val)), {
              message: "Must be a valid ISO 8601 timestamp",
            })
            .optional()
            .describe("ISO timestamp cutoff — archive entries before this time (default: now)"),
          keep_decisions: z
            .boolean()
            .optional()
            .describe("Whether to keep decision entries in the blackboard (default: true)"),
          summarize: z
            .boolean()
            .optional()
            .describe("Whether to post a summary finding after archiving (default: true)"),
        },
      },
      async (args) => {
        try {
          const result = await archiver.archive(args);
          return toolResult(result);
        } catch (e) {
          if (e instanceof TwiningError) {
            return toolError(e.message, e.code);
          }
          return toolError(
            e instanceof Error ? e.message : "Unknown error",
            "INTERNAL_ERROR",
          );
        }
      },
    );

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/daveangulo/twining-mcp'

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