Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENCODE_DATA_DIRNoPath to the OpenCode data directory. Overrides auto-detection. Useful when OpenCode data lives in a non-standard location (e.g., on a mounted Windows drive in WSL).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_historyA

Search past OpenCode conversations by keyword (full-text on user prompts and assistant responses).

find_sessions_by_fileA

Find sessions that modified or mentioned a specific file.

Searches patch records (files actually changed) and file mentions in text. Uses an indexed file_paths table for fast lookup (<50ms).

find_related_workA

Find sessions related to a task description by matching session titles and original user prompts.

More precise than search_history for finding sessions on the same topic.

get_session_detailA

Get full details of a specific session.

Returns metadata, original task (first user prompt), files modified, and the last assistant message.

get_session_messagesA

Read the actual messages from a session (paginated).

Use this after finding a session with the discovery tools to read its content. Each text part is hard-truncated to 1000 chars to control token budget. Tool calls return only name + status (not output). File/base64 parts are skipped.

list_sessionsA

Browse sessions filtered by directory. Root sessions only (sub-agents excluded).

get_statsA

Overview statistics: session counts, messages, cost, time range, and distribution.

Root vs sub-agent breakdown. Top directories by activity.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/crottolo/opencode-history-mcp'

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