Skip to main content
Glama

Clear Advisor Log

clear_advisor_log
Destructive

Clear the consultation log and metadata to reset the advisor state for a new project.

Instructions

Clear the consultation log and metadata to start fresh for this project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for clear_advisor_log tool. Writes an empty/inital advisor-log.md and clears advisor-meta.jsonl.
    }, async () => {
      try {
        await ensureAdvisorDir();
        await writeFile(
          ADVISOR_LOG,
          `# Opus Advisor Log\n\nProject: ${basename(process.cwd())}\nPath: ${process.cwd()}\n\n---\n`,
        );
        await writeFile(ADVISOR_META, "");
        return {
          content: [{ type: "text" as const, text: "Advisor log and metadata cleared." }],
        };
      } catch (err) {
        const message =
          err instanceof Error ? err.message : "Unknown error clearing log";
        return {
          content: [{ type: "text" as const, text: `Error: ${message}` }],
          isError: true,
        };
      }
  • Schema: no input parameters required.
    inputSchema: {},
  • src/index.ts:629-655 (registration)
    Registration of clear_advisor_log tool with title, description, empty input schema, destructive hint annotation, and handler.
    server.registerTool("clear_advisor_log", {
      title: "Clear Advisor Log",
      description: "Clear the consultation log and metadata to start fresh for this project.",
      inputSchema: {},
      annotations: {
        destructiveHint: true,
      },
    }, async () => {
      try {
        await ensureAdvisorDir();
        await writeFile(
          ADVISOR_LOG,
          `# Opus Advisor Log\n\nProject: ${basename(process.cwd())}\nPath: ${process.cwd()}\n\n---\n`,
        );
        await writeFile(ADVISOR_META, "");
        return {
          content: [{ type: "text" as const, text: "Advisor log and metadata cleared." }],
        };
      } catch (err) {
        const message =
          err instanceof Error ? err.message : "Unknown error clearing log";
        return {
          content: [{ type: "text" as const, text: `Error: ${message}` }],
          isError: true,
        };
      }
    });
  • Helper function that ensures the advisor directory exists before writing logs.
    async function ensureAdvisorDir(): Promise<void> {
      await mkdir(ADVISOR_DIR, { recursive: true });
    }
  • Constants defining the path to the advisor log and metadata files.
    const ADVISOR_DIR = getAdvisorDir();
    const ADVISOR_LOG = join(ADVISOR_DIR, "advisor-log.md");
    const ADVISOR_META = join(ADVISOR_DIR, "advisor-meta.jsonl");
Behavior4/5

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

The description adds context beyond the destructiveHint annotation by specifying what gets cleared (log and metadata). It is consistent with the annotation and gives agents understanding of the tool's impact.

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 directly conveys the purpose. No superfluous words, front-loaded with action and resource.

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

Completeness5/5

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

Given the tool's simplicity (zero parameters, no output schema, clear annotations), the description is complete. It tells an agent exactly what the tool does and when to use it.

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

Parameters4/5

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

There are no parameters; the schema coverage is 100%. The description does not need to elaborate on parameters, and it provides no irrelevant information.

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?

The description clearly states the action 'clear' and the resources 'consultation log and metadata'. It distinguishes this tool from the read-only siblings (read_advisor_log, read_advisor_meta).

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

Usage Guidelines4/5

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

The phrase 'to start fresh for this project' implies appropriate usage context. However, it lacks explicit guidance on when not to use or mention of alternatives, though the sibling tool names provide implicit contrast.

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/Divinci-AI/opus-advisor-mcp'

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