Skip to main content
Glama

set_journal

Set the active journal for operations in the jrnl MCP Server. Use this tool to specify the journal name for tasks like searching entries, listing tags, or viewing statistics.

Instructions

Set the active journal for subsequent operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
journalNameYesName of the journal to set as active

Implementation Reference

  • The core implementation of the set_journal tool handler. Sets the currentJournal variable in memory and returns a success response with the new current journal.
    export async function setJournal( journalName: string, ): Promise<{ success: boolean; currentJournal: string }> { currentJournal = journalName; return { success: true, currentJournal: journalName, }; }
  • Input schema definition for the set_journal tool, specifying that journalName is a required string.
    inputSchema: { type: "object", properties: { journalName: { type: "string", description: "Name of the journal to set as active", }, }, required: ["journalName"], },
  • src/index.ts:128-141 (registration)
    Registration of the set_journal tool in the MCP server's list of available tools, including schema and description.
    { name: "set_journal", description: "Set the active journal for subsequent operations", inputSchema: { type: "object", properties: { journalName: { type: "string", description: "Name of the journal to set as active", }, }, required: ["journalName"], }, },
  • src/index.ts:229-243 (registration)
    Dispatcher case in CallToolRequestHandler that invokes the setJournal handler for the set_journal tool.
    case "set_journal": return { content: [ { type: "text", text: JSON.stringify( await setJournal( typeof args?.journalName === "string" ? args.journalName : "", ), null, 2, ), }, ], };

Other Tools

Related Tools

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/yostos/jrnl-mcp'

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