Skip to main content
Glama
yostos
by yostos

set_journal

Select which journal to use for searching entries, listing tags, and viewing statistics in the command-line journal system.

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 handler function that implements the logic for the 'set_journal' tool. It sets a module-level 'currentJournal' variable to the provided journalName and returns a success response.
    export async function setJournal(
      journalName: string,
    ): Promise<{ success: boolean; currentJournal: string }> {
      currentJournal = journalName;
    
      return {
        success: true,
        currentJournal: journalName,
      };
    }
  • src/index.ts:128-141 (registration)
    Registers the 'set_journal' tool with the MCP server by including it in the list of available tools returned by ListToolsRequestHandler. Includes the tool's input schema for validation.
    {
      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"],
      },
    },
  • Defines the input schema for the 'set_journal' tool, specifying that it requires a 'journalName' string parameter.
    inputSchema: {
      type: "object",
      properties: {
        journalName: {
          type: "string",
          description: "Name of the journal to set as active",
        },
      },
      required: ["journalName"],
    },
  • The dispatch handler in the CallToolRequestHandler that invokes the setJournal function when 'set_journal' is called, formats the response as MCP content.
    case "set_journal":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await setJournal(
                typeof args?.journalName === "string" ? args.journalName : "",
              ),
              null,
              2,
            ),
          },
        ],
      };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool sets an active journal but doesn't explain what 'active' means, whether this affects other operations, if it requires specific permissions, or what happens on failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that is front-loaded with the core action. There is zero waste or redundancy, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation operation with no annotations and no output schema), the description is incomplete. It lacks details on behavioral traits, error handling, or the impact of 'subsequent operations.' For a tool that likely changes system state, this minimal description is inadequate to ensure safe and correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with journalName clearly documented. The description adds no additional meaning beyond the schema, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and the resource ('active journal'), specifying it's for subsequent operations. It distinguishes from siblings like list_journals (listing) and search_entries (searching), though it doesn't explicitly contrast with them. The purpose is specific but lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing journal), exclusions, or comparisons to sibling tools like list_journals. Usage is implied only by the phrase 'for subsequent operations,' but this is vague and insufficient for clear decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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