Skip to main content
Glama

ask_history

Read-only

Answers questions from your past sessions with thread citations and a source list, helping you recall prior work without reading many threads.

Instructions

Answer a question from the user's own past sessions (RAG) with [thread N] citations and a source list. Use for "how did we..." questions instead of reading many threads. Needs an LLM engine set up in the app.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "question": "<question>"
    },
    "name": "ask_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
questionYesThe question to answer from the user's history.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.4
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "answer": {
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "properties": {
      +              "messageId": {
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              },
      +              "projectPath": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "source": {
      +                "type": "string"
      +              },
      +              "threadId": {
      +                "type": "integer"
      +              },
      +              "title": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "threadId",
      +              "title",
      +              "source",
      +              "projectPath",
      +              "messageId"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "answer",
      +        "sources"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "notice": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "notice"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.11.3
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / title
      Removed value: -"AskArgs"
  3. Addedv0.6.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely new context: the answer is synthesized and cited to thread numbers with a source list, and the tool fails without an LLM engine configured — an environment prerequisite an agent must know before calling.

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?

Two sentences with zero filler: what it returns comes first, then when to use it, then the setup prerequisite. The trigger phrase is quoted so it is easy to pattern-match against a user's request.

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?

An output schema exists, so return values need no prose explanation, and the description still surfaces the key prerequisite and the citation format. It does not mention cost/latency of an LLM-backed answer or what happens if no relevant sessions exist, which are the remaining gaps for a RAG tool.

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?

Only one parameter and schema coverage is 100%, so the schema already documents 'question' fully. The description adds a small scoping nuance ('from the user's own past sessions') indicating the question should be about the user's history, but nothing on phrasing, length, or expected answer granularity beyond that.

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?

States a specific verb+resource ('Answer a question from the user's own past sessions') and adds the RAG mechanism plus the output shape ('[thread N] citations and a source list'). It distinguishes itself from the many retrieval siblings by framing itself as answering rather than listing, though it never names a specific alternative tool.

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?

Gives a concrete trigger pattern ('how did we...' questions) and an explicit cheaper alternative to avoid ('instead of reading many threads'), plus a hard prerequisite (LLM engine set up in the app). No explicit when-not or named sibling routing, which keeps it below a 5.

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