Skip to main content
Glama
Takahashi-Kenji

hamlog-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HAMLOG_DBNoPath to the SQLite cache database file.
HAMLOG_DLLNoPath to the HAMLOG50.DLL file.
HAMLOG_HDBNoPath to the HAMLOG.HDB file for direct reading via HAMLOG50.DLL.
HAMLOG_PY32NoFull path to the 32-bit python.exe used for reading HAMLOG.HDB via the DLL.
HAMLOG_EXPORTNoPath to the ADIF/CSV export file. If set, the server automatically imports it on first launch.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
db_infoA

ログキャッシュの状態を返す。

交信数、ユニークコールサイン数、日付範囲、使われているバンドとモード、 取り込み元ファイルと取り込み日時。まず最初にこれを呼ぶと全体像がつかめる。

import_logA

HAMLOG からエクスポートしたログファイルを読み込んでキャッシュを更新する。

HAMLOG 側のデータは読むだけで変更しない。書き込むのは自前の SQLite のみ。 ADIF (.adi/.adif) を推奨。HAMLOG 独自 CSV も best-effort で読める。

Args: path: ログファイルのパス。省略時は環境変数 HAMLOG_EXPORT を使う。 replace: True なら既存キャッシュを破棄して入れ直す。False なら追記。 csv_columns: CSV の列順が既定と違う場合に指定する列名リスト。

search_qsoA

条件を指定して交信記録を検索する。

Args: callsign: コールサイン。JA1* のようにワイルドカード (* ?) が使える。 band: "40m" のようなバンド名。db_info で使用中の一覧が分かる。 mode: "CW" など。大文字小文字は問わない。 date_from: 開始日 YYYY-MM-DD (この日を含む)。 date_to: 終了日 YYYY-MM-DD (この日を含む)。 jcc_prefix: JCC/JCG コードの前方一致。"09" で長野県など。 qsl_rcvd: True で QSL 受領済みのみ、False で未受領のみ。 name_contains: 相手局名の部分一致。 qth_contains: QTH の部分一致。 limit: 返す件数の上限 (既定 50)。総件数は total に入る。 offset: 読み飛ばす件数。ページングに使う。 order: qso_date の並び順。

qso_statsA

交信数を指定した軸で集計する。

絞り込み条件は search_qso と同じものが使える。 group_by の意味: band/mode バンド別・モード別 year/month 年別・月別 hour 時間帯別 (交信時刻の時。ログの時刻が JST か UTC かに依存) call 相手局別 (よく交信している局) jcc JCC/JCG コード別 prefecture JCC 上 2 桁別 (都府県名は award_progress のほうが読みやすい) gridsquare グリッドロケータの上 4 桁別

station_historyA

特定の局との交信履歴をまとめて返す。

初回交信日、最終交信日、交信したバンドとモード、記録されている名前と QTH、 および各交信の明細。交信中に相手の履歴を確認する用途を想定している。

Args: callsign: 相手局のコールサイン (完全一致)。 limit: 返す明細の上限。

award_progressA

アワードの進捗を出す。取得済みと未取得の両方を返す。

prefecture は都府県 47 の取りこぼしが分かるので「次にどこを狙うか」に使える。 jcc と gridsquare は全体の母数が定義できないため、取得済みの一覧と数のみ返す。

Args: kind: prefecture (都府県) / jcc (市郡区コード) / gridsquare (GL 上 4 桁)。 band: バンドで絞る (バンドごとの進捗を見るとき)。 mode: モードで絞る。 date_from: 開始日 YYYY-MM-DD。 date_to: 終了日 YYYY-MM-DD。 qsl_rcvd: True にすると QSL 受領済みの交信のみで判定する。 include_worked_detail: True で取得済みの各項目に交信数と初回/最終日を付ける。

get_hamlog_inputA

起動中の Turbo HAMLOG の入力ウィンドウの内容を読む (読み取りのみ)。

今まさに入力中のコールサイン・レポート・周波数などが取れる。 交信中に「この局とは前にいつ交信したか」を調べる起点に使う。 HAMLOG 側は一切変更しない。

Windows かつ HAMLOG (Ver5.27c 以降) が起動している必要がある。 HAMLOG と本サーバは同じユーザー・同じ権限レベルで動かすこと。

import_from_hdbA

HAMLOG.HDB を HAMLOG50.DLL 経由で直接読み、キャッシュを更新する。

ADIF エクスポートの手間なしに、常に最新のログを取り込める。 読み取り専用で、HAMLOG のデータは変更しない (書き込み API は未バインド)。

HAMLOG50.DLL は 32 ビットなので、DLL を触る部分だけを 32 ビット Python の 子プロセスに分離して実行する。MCP サーバ本体は 64 ビットのままでよく、 32 ビット側に追加パッケージを入れる必要もない。

Args: hdb_path: HAMLOG.HDB のフルパス。省略時は環境変数 HAMLOG_HDB。 dll_path: HAMLOG50.DLL のフルパス。省略時は環境変数 HAMLOG_DLL。 py32_path: 32 ビット python.exe のパス。省略時は環境変数 HAMLOG_PY32。 本サーバ自体が 32 ビットで動いている場合は不要。 use_copy: True (既定) なら HDB と MST を一時領域へ複製してから開く。 HamlogOpen はインデックスが無ければ生成するため、原本のフォルダに ファイルを作らせないための措置。HAMLOG 起動中でも安全に読める。 limit: 先頭から読む件数の上限。動作確認用。

check_hdb_layoutA

HDB 読み込み経路の自己診断。DLL や HDB が無くても実行できる。

構造体サイズの検証と、合成レコードでの読み出しテストを行う。 32 ビット Python が指定されていればそちらで実行し、経路全体を確認する。 import_from_hdb が失敗するとき、まずこれを呼んで切り分けること。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 9 tools

Disambiguation4/5

Each tool has a distinct primary role: status, file import, HDB import, search, aggregate stats, station history, award progress, live input reading, and diagnostics. Slight overlap exists between search_qso and station_history when filtering by callsign, and between import_log and import_from_hdb, but the descriptions clearly distinguish their intended use cases.

Naming Consistency4/5

All names use consistent snake_case and are readable, but the set mixes verb-led names (import_log, search_qso, get_hamlog_input) with noun-led names (db_info, qso_stats, station_history, award_progress). This is a minor deviation from a uniform verb_noun pattern, though the naming remains predictable overall.

Tool Count5/5

Nine tools is well-scoped for a read/analysis server for amateur radio logs. Each tool earns its place, covering status, import, search, aggregation, history, awards, live input, and diagnostics without redundancy.

Completeness4/5

The surface covers the full read/import/analysis lifecycle: cache status, two import paths, flexible search, statistics, station history, award progress, live input reading, and a diagnostic tool. No direct update/delete operations exist, but that aligns with the read-only nature of the HAMLOG source. A minor gap is the lack of an explicit cache-clearing or individual record management tool, though replace options in import tools mitigate this.

Maintenance

ActivityMaintained
ResponsivenessNo issues