Skip to main content
Glama

LogNexus Note: Attach state as Git Note to commit

lognexus_note_attach

Attach the current LogNexus state as a Git Note to an existing commit, defaulting to HEAD. Use it to backfill notes on externally created commits or repair a missing note after normal commits.

Instructions

Attach the current LogNexus state as a Git Note (refs/notes/lognexus) to a commit that already exists. Defaults to HEAD. Use when backfilling manually on commits created outside the commit engine, or repairing a missing note. Not for normal commits: lognexus_commit already attaches the note as part of the atomic operation, so attaching again is only needed when the note was lost.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "commitRef": "HEAD"
    },
    "name": "lognexus_note_attach"
  }
}

Input Schema

NameRequiredDescriptionDefault
commitRefNoGit commit reference (SHA, branch, tag or HEAD). Defaults to HEAD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.6
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "commitRef": "HEAD"
      +  }
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that this is a mutation writing into a specific notes ref, that the commit must already exist, and that re-attaching is a repair path. It stops short of saying whether an existing note is overwritten or what the tool returns on success/failure, which matters for a write operation on a ref another tool also writes.

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

Conciseness4/5

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

Front-loaded with the action and target ref, then the usage condition, then the exclusion. Slightly redundant: the exclusion is stated twice ('Not for normal commits' and 'attaching again is only needed when the note was lost'), but the second pass adds the repair rationale rather than pure repetition.

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

Completeness4/5

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

For a one-parameter tool with no annotations and no output schema, the description supplies target, default, ref namespace, and the routing decision against lognexus_commit. The remaining gap is overwrite semantics when a note already exists at that ref, which an agent calling a 'repair' tool would want to know.

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?

Schema coverage is 100% and the single parameter is fully documented there. The description only restates the HEAD default and the 'already exists' precondition, adding no syntax or format detail beyond the schema, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource: attach the current LogNexus state as a Git Note at refs/notes/lognexus onto an existing commit, defaulting to HEAD. It explicitly names the sibling lognexus_commit and explains how this differs from it, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (backfilling commits created outside the commit engine, repairing a lost note) and explicit when-not-to-use (normal commits, because lognexus_commit attaches the note atomically). The alternative and the condition selecting it are both named.

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