hamlog-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hamlog-mcphow many 7MHz CW QSOs this year?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hamlog-mcp
Turbo HAMLOG のログを読むための MCP サーバ。読み取り専用。
交信データの登録・更新・削除にあたるツールは実装していません。HAMLOG の
.hdb を開くこともしません。自分のログを自然言語で検索・集計するためのものです。
ログの取り込み方は 2 通り
A. HAMLOG.HDB を直接読む (import_from_hdb)
HAMLOG50.DLL 経由で HDB を直接読みます。エクスポート操作が不要で、
常に最新のログが見えます。
HAMLOG50.DLL は 32 ビットですが、MCP サーバ本体は 64 ビットのままで
かまいません。DLL を触る部分だけを hdb_dump.py という子プロセスに
分離し、32 ビット Python で実行して JSON を受け取る構成です。
hdb_dump.py は 標準ライブラリしか使いません。32 ビット側に pip で
何かを入れる必要はなく、32 ビット Python の実行ファイルがあるだけで動きます。
これは MCP SDK が pyjwt[crypto] 経由で cryptography を要求し、
cryptography には 32 ビット Windows 用の wheel が無いためです
(ソースビルドに落ちて Rust ツールチェーンが要る)。
安全のため、既定では HDB と MST を一時領域へ複製してから開きます
(use_copy=True)。HamlogOpen はインデックスファイルが無ければ生成するので、
原本のフォルダに副産物を作らせないためです。HAMLOG 起動中でも安全に読めます。
バインドしている DLL 関数は HamlogOpen / HamlogClose / THW_read /
dbf_rcount の 4 つだけです。DB_append THW_append THW_update
QSL_Rcv QSL_Send THW_zap といった書き込み系は意図的に未バインドで、
呼ぼうとしてもコード上存在しません。
B. ADIF をエクスポートして読む (import_log)
64 ビット Python でも使え、HAMLOG が起動していなくても動きます。 DLL も不要です。手軽さならこちら。
どちらも同じ SQLite キャッシュに入るので、以降の検索・集計ツールは共通です。
32 ビット Python の指定
環境変数 HAMLOG_PY32 に 32 ビット python.exe のフルパスを設定します。
仮想環境である必要はなく、インストールした本体を直接指定して構いません。
HAMLOG_PY32 = C:\\Users\\<user>\\AppData\\Local\\Programs\\Python\\Python313-32\\python.exe子プロセスの単体確認もできます (DLL 不要):
set PYTHONPATH=C:\hamlog-mcp
<32bit python.exe> -m hamlog_mcp.hdb_dump --self-test構造体について
TQsoBuff の肝は Hiss[764] で、これは単なる HIS RST 欄ではなく
可変長 8 項目 (Hiss/Myrs/Freq/Mode/Name/Qth/Rmk1/Rmk2) を連結した
バッファです。*Myrs 〜 *Rmk2 のポインタはこの中を指します。
HAMLOG50.H のコメントにある各最大長 13/13/17/17/65/129/255/255 の合計が
ちょうど 764 で一致します。
重要: ヘッダのコメントにある 13/13/17/17/65/129/255/255 は各項目の 「最大長」であって、実際のフィールド長ではありません。実データでは 4/4/8/7/13/29/55/55 のように短いことがあり、データファイルの構造に依存します。 固定オフセットで実装すると全項目が壊れます。
本実装は決め打ちせず、HamlogOpen 後の実際のポインタ値からオフセットを
実測します (自己校正)。最終項目 (Rmk2) だけは後ろにポインタが無いため、
構造体の Rmk2Len で長さを決めます。実際に使われたレイアウトは
import_from_hdb の戻り値の hiss_layout で確認できます。check_hdb_layout で構造体サイズの自己診断ができます
(sizeof(TQsoBuff)==857, sizeof(TThLog)==3927)。
なお long は Win32 では 4 バイトなので、構造体では c_long ではなく
c_int32 を使っています。ここを間違えると TDBFh が 8 バイトずれます。
Related MCP server: Beeper MCP Server
セットアップ
1. インストール
pip install -e .
# Windows で get_hamlog_input を使う場合のみ
pip install pywin32MCP SDK は 2.x / 1.x のどちらでも動きます(server.py で吸収しています)。
2. HAMLOG からログを出す
HAMLOG のメニューから ADIF 形式でエクスポートします。 文字コードは UTF-8 でも Shift_JIS でも自動判別します。
CSV でも読めますが、列の並びがバージョンや出力設定で変わるため、
最初の 1 回は search_qso の結果を目で確認してください。
並びが違う場合は import_log の csv_columns に列名リストを渡します。
3. MCP クライアントに登録
Claude Desktop なら設定ファイルの mcpServers に、Claude Code なら
claude mcp add で、いずれも下記の内容を登録します。設定ファイルの正確な
場所と書式は公式ドキュメントを参照してください
(https://docs.claude.com/en/docs/claude-code/mcp)。
{
"mcpServers": {
"hamlog": {
"command": "python",
"args": ["-m", "hamlog_mcp.server"],
"env": {
"HAMLOG_EXPORT": "C:\\\\Hamlog\\\\export.adi",
"HAMLOG_DB": "C:\\\\Hamlog\\\\hamlog-mcp.sqlite3",
"HAMLOG_HDB": "C:\\\\Hamlog\\\\HAMLOG.HDB",
"HAMLOG_DLL": "C:\\\\Hamlog\\\\HAMLOG50.DLL"
}
}
}
}HAMLOG_EXPORT を設定しておくと、初回起動時に自動で取り込みます。
ログを更新したら import_log を呼び直してください。
ChatGPT デスクトップ、Cursor、VS Code などでも同じサーバがそのまま使えます。 MCP はクライアントを選びません。
ツール
ツール | 内容 |
| キャッシュの状態。交信数、日付範囲、使用バンド・モード |
| エクスポートファイルを読み込んでキャッシュを更新 |
| コールサイン(ワイルドカード可)・バンド・モード・期間・JCC・QSL 状況で検索 |
| バンド/モード/年/月/時間帯/相手局/JCC/都府県/GL 別の集計 |
| 特定局との全交信履歴。初回・最終交信日、使ったバンドとモード |
| 都府県 47 の取得済み・未取得。JCC と GL は取得済み一覧 |
| 起動中 HAMLOG の入力ウィンドウを読む(Windows のみ、読み取りのみ) |
| HAMLOG.HDB を DLL 経由で直接読み込む(32 ビット Python) |
| 読み込み経路の自己診断。DLL や HDB が無くても実行できる |
全ツールに MCP の readOnlyHint を付けてあるので、クライアント側で
「確認なしで呼んでよいツール」として扱われます。
聞き方の例
「今年 7MHz の CW で何局と交信した?」
「JA1ABC とは前にいつ交信した?」
「都府県アワードであと足りないのはどこ?」
「40m CW だけで見たときの都府県の進捗は?」
「一番よく交信している時間帯は?」
「QSL 未受領の交信を古い順に 20 件」
実装メモ
SQLite 接続は スレッドごとに持つ (
threading.local)。MCP サーバは ツールをスレッドプールで実行するため、単一接続を使い回すと 2 回目以降の 呼び出しが別スレッドに乗った瞬間にProgrammingError: SQLite objects created in a thread can only be used in that same threadになる。CLI から叩いている間は単一スレッドなので 露見しない。journal_mode=WALとbusy_timeout=30000を設定してある。cache.sqlite3-wal/-shmが並んでできるのは正常。
注意
hour集計は交信時刻の「時」をそのまま使います。ログが JST か UTC かは HAMLOG 側の設定に依存するので、解釈するときは確認してください。都府県の判定は
hamlog_mcp/data/jcc_prefectures.jsonの対応表によります。 この表は手で編集できます。誤りがあれば JARL の資料で確認して直してください。 対応表に無いコードはunrecognized_codesに出ます。import_from_hdbを使うときは Turbo HAMLOG を終了してください。 HAMLOG はデータファイルを排他モードで開くため、起動中は読み取り目的の 複製すらできずWinError 32になります。ADIF 経路 (import_log) には この制約はありません。get_hamlog_inputは HAMLOG Ver5.27c 以降が対象です。HAMLOG 本体と 本サーバを同じユーザー・同じ権限レベルで起動してください。片方だけ 管理者権限だと UIPI でメッセージが弾かれます。
HAMLOG50.DLL の利用条件
import_from_hdb を使う場合、HAMLOG 付属の HAMLOG50.DLL を利用することに
なります。作者 JG1MOU 局が定める条件は「Turbo HAMLOG 用のツールを作成する
場合にのみ利用可」です。本ツールはこれに該当します。
DLL 自体は同梱していません。HAMLOG のインストール先にあるものを
HAMLOG_DLL で指定して使ってください。もし本ツールを再配布する場合は、
Th527api.zip 同梱の Hamlog50.txt と Readme.txt の条件を確認してください。
ADIF 経路 (import_log) だけを使うなら DLL は不要で、この条件もかかりません。
ライセンス
本リポジトリのコードは MIT License で公開しています。
HAMLOG50.DLL は本リポジトリに含まれず、MIT License の対象外です。
DLL の利用には上記の条件が適用されます。
Available Tools
9 toolsaward_progressARead-onlyIdempotent
アワードの進捗を出す。取得済みと未取得の両方を返す。
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 で取得済みの各項目に交信数と初回/最終日を付ける。
| Name | Required | Description | Default |
|---|---|---|---|
| band | No | ||
| kind | No | prefecture | |
| mode | No | ||
| date_to | No | ||
| qsl_rcvd | No | ||
| date_from | No | ||
| include_worked_detail | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds real behavioral substance: prefecture returns both obtained and un-obtained, jcc/gridsquare return only a worked list plus count, qsl_rcvd narrows judgement to QSL-received contacts, and include_worked_detail attaches counts and first/last dates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the core effect in one line, then progressively layers kind-specific caveats and the argument list. Slightly long and the Args block partly restates schema fields, but every sentence carries information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates by explaining what each kind returns (obtained/un-obtained vs list+count) and what include_worked_detail adds. Adequate for a 7-parameter read tool; only the concrete response shape per kind is left implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the burden and largely meets it: it documents all seven parameters, including the kind enum values (prefecture/jcc/gridsquare), band/mode filters, date range format (YYYY-MM-DD), and the effect of qsl_rcvd and include_worked_detail. Minor gaps remain (e.g. accepted band/mode value forms).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (アワードの進捗を出す) and immediately scopes the return to obtained + un-obtained items. It further distinguishes its own behavior per kind (prefecture vs jcc/gridsquare), which lets an agent tell it apart from siblings like qso_stats or search_qso.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete usage conditions: prefecture kind reveals the missing 47 so it suits 'where to aim next', while jcc/gridsquare cannot be judged against a defined population and only return a worked list and count. Clear context but no explicit naming of sibling alternatives or when-not-to-use statements.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_hdb_layoutARead-onlyIdempotent
HDB 読み込み経路の自己診断。DLL や HDB が無くても実行できる。
構造体サイズの検証と、合成レコードでの読み出しテストを行う。 32 ビット Python が指定されていればそちらで実行し、経路全体を確認する。 import_from_hdb が失敗するとき、まずこれを呼んで切り分けること。
| Name | Required | Description | Default |
|---|---|---|---|
| py32_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description adds genuinely non-obvious behavior: it works without the DLL or HDB file present, and it will delegate to a 32-bit Python interpreter when one is supplied. It stops short of describing what the diagnostic reports or exit/failure signaling, so it is not fully complete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, front-loaded with the purpose, then the mechanics, then the routing rule. No filler, though the 'runs under 32-bit Python' detail is slightly redundant with the parameter name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a read-only diagnostic with no output schema, the description covers purpose, preconditions, the 32-bit path option, and the escalation trigger from import_from_hdb. The one gap is that an agent cannot tell what a successful vs failed diagnostic returns, which matters for a troubleshooting tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the burden is on the description. It does explain the behavioural effect of supplying 32-bit Python (execution switches to that interpreter to exercise the whole path), but it never states the expected value format (a path to a Python executable) or what happens with a bad value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: a self-diagnostic of the HDB read path, with the concrete checks it performs (struct size validation, synthetic-record read test). It also names the failure scenario that selects it, which separates it from siblings like import_from_hdb and db_info.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent: 'when import_from_hdb fails, call this first to isolate the problem.' That is a concrete when-to-use condition tied to a named alternative, plus the precondition that it runs even without DLL or HDB present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_infoARead-onlyIdempotent
ログキャッシュの状態を返す。
交信数、ユニークコールサイン数、日付範囲、使われているバンドとモード、 取り込み元ファイルと取り込み日時。まず最初にこれを呼ぶと全体像がつかめる。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond the annotations by naming exactly what information will be returned and positioning the tool as an initial overview call. It does not mention permissions, rate limits, or response format, but given the annotation coverage this is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded: the first sentence states the action, the middle enumerates return contents, and the final sentence provides usage guidance. Every line earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-parameter, read-only information tool with rich annotations but no output schema, the description is complete enough: it lists the returned fields so an agent knows what data to expect and explains that calling it first gives an overview. No essential invocation detail is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The empty schema means there is nothing for the description to compensate for, and the description does not need to explain parameter syntax or formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it returns the state of the log cache, and it enumerates the exact contents (QSO count, unique callsigns, date range, bands/modes, import source files and timestamps). This clearly distinguishes it as a metadata/overview tool rather than a search or import tool. However, it does not explicitly contrast itself with the sibling qso_stats, which may also provide counts and statistics, so sibling differentiation is implicit at best.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The final sentence explicitly says to call this tool first to grasp the overall picture, which is clear context for when to use it. It does not, however, state when not to use it or name alternative tools for more detailed queries, so it stops short of full when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_hamlog_inputARead-onlyIdempotent
起動中の Turbo HAMLOG の入力ウィンドウの内容を読む (読み取りのみ)。
今まさに入力中のコールサイン・レポート・周波数などが取れる。 交信中に「この局とは前にいつ交信したか」を調べる起点に使う。 HAMLOG 側は一切変更しない。
Windows かつ HAMLOG (Ver5.27c 以降) が起動している必要がある。 HAMLOG と本サーバは同じユーザー・同じ権限レベルで動かすこと。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/non-destructive, but the description adds genuinely useful environment context: HAMLOG itself is never modified, and the server must run as the same user at the same privilege level as HAMLOG. It does not describe what happens when HAMLOG is not running or how stale the window data might be.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads what is read and the read-only guarantee, then the use case, then prerequisites — a sensible ordering. Slightly more lines than strictly necessary, but every sentence carries distinct information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers what is returned at a conceptual level (callsign, report, frequency) and all prerequisites, which is adequate given there is no output schema and no parameters. The absence of any failure-mode or staleness note is the only gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a no-param tool applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource — reads the contents of the Turbo HAMLOG input window — and explicitly scopes it as read-only (読み取りのみ). The 'running input window' focus distinguishes it from data-oriented siblings like search_qso and qso_stats, though it never names an alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a concrete use case: as a starting point during a QSO to look up when you last worked a station. It also states clear preconditions (Windows, HAMLOG 5.27c+, same user/permission level as the server). It stops short of naming the sibling that performs the follow-up lookup.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
import_from_hdbAIdempotent
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: 先頭から読む件数の上限。動作確認用。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| dll_path | No | ||
| hdb_path | No | ||
| use_copy | No | ||
| py32_path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations, the description discloses the 32-bit subprocess isolation architecture, that write APIs are unbound (source data is never mutated), env-var fallbacks for all path args, and that use_copy is a guard against HamlogOpen generating index files in the original folder. That is substantial behavioral context; only the return/shape of the cache update is left unexplained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core action is front-loaded in the first sentence, followed by value proposition and architectural rationale. It is a little long, but the subprocess and use_copy paragraphs explain non-obvious behavior that an agent could not get elsewhere, so most sentences earn their place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an import tool with no output schema and five loosely-typed parameters, the description is nearly complete on inputs and runtime behavior. The remaining gap is what the cache update returns or how success/failure is surfaced, which matters for an import operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries full documentation burden and does: it explains each of the five parameters, their env-var defaults (HAMLOG_HDB/DLL/PY32), the default and rationale for use_copy, the test-only nature of limit, and when py32_path is unnecessary.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a precise verb+resource: reading HAMLOG.HDB directly through HAMLOG50.DLL and updating the cache, with the ADIF-free benefit made explicit. It is easy to tell apart from layout/config siblings like check_hdb_layout or get_hamlog_input, but it never names the closest sibling alternative (import_log) to disambiguate the import paths.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than stated: 'without the hassle of ADIF export' hints at when this beats an export-and-import flow, and notes it is safe while HAMLOG is running. There is no explicit when-to-use / when-not-to-use guidance and no routing to import_log or other siblings, so the agent must infer the choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
import_logAIdempotent
HAMLOG からエクスポートしたログファイルを読み込んでキャッシュを更新する。
HAMLOG 側のデータは読むだけで変更しない。書き込むのは自前の SQLite のみ。 ADIF (.adi/.adif) を推奨。HAMLOG 独自 CSV も best-effort で読める。
Args: path: ログファイルのパス。省略時は環境変数 HAMLOG_EXPORT を使う。 replace: True なら既存キャッシュを破棄して入れ直す。False なら追記。 csv_columns: CSV の列順が既定と違う場合に指定する列名リスト。
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| replace | No | ||
| csv_columns | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description states that replace=True (the schema default) discards the existing cache and re-inserts it, i.e. a non-additive update that removes data. That directly contradicts the annotation destructiveHint=false, which asserts only additive updates are performed. The rest of the disclosure (source read-only, writes confined to the local SQLite, best-effort CSV parsing) is genuinely useful, but the replace semantics conflict with the declared destructive profile.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose and the read-only/write-scope caveat are front-loaded in two short sentences, followed by a compact Args block covering all three parameters. Every line carries information; the only mild redundancy is restating the write scope already implied by the first sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a local file-import tool with no output schema, the description covers source format support, the safety boundary (HAMLOG untouched), and every parameter. It omits what an agent would still want to know about results and failure modes — whether duplicate QSOs are merged or appended, what happens on a malformed file, and what the import reports back — which keeps it short of fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden and does: path (file path, defaulting to the HAMLOG_EXPORT environment variable), replace (True = discard and rebuild the cache, False = append), and csv_columns (explicit column-name list when the CSV column order differs from the default). Each parameter's meaning and default behaviour is stated, adding real value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource (read a HAMLOG-exported log file and update the local cache) and immediately scopes what is and is not touched: HAMLOG data is read-only, only the tool's own SQLite is written. That scope statement also separates it from siblings such as import_from_hdb or check_hdb_layout, which deal with HDB sources rather than HAMLOG exports.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives input-format guidance (ADIF preferred, HAMLOG CSV best-effort) and the fallback behaviour of the path argument, which implies when the tool is applicable. However, it never states when to prefer this tool over the sibling import_from_hdb / get_hamlog_input / check_hdb_layout, nor any precondition (e.g. that an export must already exist). Usage is implied rather than routed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
qso_statsARead-onlyIdempotent
交信数を指定した軸で集計する。
絞り込み条件は search_qso と同じものが使える。 group_by の意味: band/mode バンド別・モード別 year/month 年別・月別 hour 時間帯別 (交信時刻の時。ログの時刻が JST か UTC かに依存) call 相手局別 (よく交信している局) jcc JCC/JCG コード別 prefecture JCC 上 2 桁別 (都府県名は award_progress のほうが読みやすい) gridsquare グリッドロケータの上 4 桁別
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| band | No | ||
| mode | No | ||
| date_to | No | ||
| callsign | No | ||
| group_by | No | band | |
| qsl_rcvd | No | ||
| date_from | No | ||
| jcc_prefix | No | ||
| qth_contains | No | ||
| name_contains | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds a genuine behavioral caveat: the 'hour' axis depends on whether stored log times are JST or UTC, which the agent could not infer elsewhere. It does not describe the return shape, but no output schema exists and the axis list partially compensates.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose in one short sentence, then a compact bulleted list of group_by meanings. Minimal waste, though the parenthetical about award_progress and the JST/UTC aside slightly interrupt the list flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an 11-parameter tool with no schema descriptions and no output schema, the description covers group_by well and delegates filters to search_qso, but never explains the top limit, default behavior, or output format. Adequate but not fully sufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 11 parameters, so the description must carry the load. It fully explains group_by values and delegates the filter parameters ('same as search_qso'), which is useful but indirect. Core parameters like top (result limit), date_from/date_to and qsl_rcvd receive no direct explanation, leaving real gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('集計する' on 交信数) and enumerates the aggregation axes, so the agent knows exactly what the tool produces. It also differentiates from siblings by naming search_qso (shared filters) and award_progress (better for reading prefecture names).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly implies the aggregation use case and explicitly routes one scenario (prefecture names) to award_progress. However, it never states when NOT to use this versus search_qso, only that they share filter semantics, so the boundary is left partly implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_qsoARead-onlyIdempotent
条件を指定して交信記録を検索する。
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 の並び順。
| Name | Required | Description | Default |
|---|---|---|---|
| band | No | ||
| mode | No | ||
| limit | No | ||
| order | No | desc | |
| offset | No | ||
| date_to | No | ||
| callsign | No | ||
| qsl_rcvd | No | ||
| date_from | No | ||
| jcc_prefix | No | ||
| qth_contains | No | ||
| name_contains | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare a safe (readOnly/idempotent/non-destructive) read, so the safety burden is offloaded. The description adds genuine behavioral context: default limit of 50, total-count reporting via a 'total' field, and offset-based paging. Return-field structure beyond 'total' and the query cost remain unspecified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Purpose is front-loaded in one line, then a clean Args list where every entry adds non-redundant meaning. No filler; each line earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 12-parameter tool with no output schema and 0% schema coverage, the description documents every input with examples and defaults, plus pagination and the 'total' return hint. It is essentially complete for correct invocation; only the shape of returned records is left implicit, which is acceptable absent an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description bears the full documentation burden and does so well: wildcard syntax (`JA1*`, * ?), date format and inclusivity (YYYY-MM-DD, inclusive), case-insensitive mode, JCC/JCG prefix example ('09' -> Nagano), qsl_rcvd boolean meaning, partial-match semantics for name/QTH, and limit/offset/order behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: searching QSO (contact) records with filters. This clearly distinguishes a record-search tool from aggregation siblings like qso_stats and award_progress. It does not explicitly name those siblings as alternatives, so it stops short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the search semantics, and the description usefully points to db_info for discovering valid band values. However it gives no explicit when-to-use/when-not guidance or direct comparison to the sibling aggregation tools. Cross-referencing db_info is a partial, not complete, routing signal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
station_historyARead-onlyIdempotent
特定の局との交信履歴をまとめて返す。
初回交信日、最終交信日、交信したバンドとモード、記録されている名前と QTH、 および各交信の明細。交信中に相手の履歴を確認する用途を想定している。
Args: callsign: 相手局のコールサイン (完全一致)。 limit: 返す明細の上限。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| callsign | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description adds useful behavior beyond that: the exact-match semantics of the lookup and the full shape of the returned data, including that per-contact detail is capped by limit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The output contents and use case are front-loaded before the Args block, and every sentence carries information. It is slightly verbose in listing returned fields, but nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description compensates by enumerating the returned data; with annotations covering safety, the remaining needs are met. A brief note on ordering or how limit interacts with the summary fields would make it fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the parameters, and it does: callsign is described as an exact-match lookup (a meaningful constraint), and limit as the cap on returned detail rows. Both params get semantics the bare schema does not provide.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('returns the contact history with a specific station') and enumerates the concrete fields returned (first/last contact date, bands, modes, name, QTH, per-contact detail), so an agent knows exactly what this produces. It does not name sibling tools like search_qso or qso_stats to differentiate scope, which keeps it short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear use scenario ('intended for confirming the other party's history during a QSO'), which tells an agent when to reach for it. It stops short of naming the alternative tools or stating when NOT to use it, so it is clear context rather than explicit routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v0.1.0- First observed
award_progress - First observed
check_hdb_layout - First observed
db_info - First observed
get_hamlog_input - First observed
import_from_hdb - First observed
import_log - First observed
qso_stats - First observed
search_qso - First observed
station_history
TDQS
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
Query Allen-Bradley and Siemens PLC projects, live tag values, and analyses in plain English.
Ask questions in plain language, get answers from your business database. No SQL required.
Query and audit AppSheet apps in natural language via Knotrik's pre-scanned definitions.
Generate, fix, explain and run read-only SQL on PostgreSQL, MySQL and SQL Server
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying log data stored in SQLite databases through the Model Context Protocol, allowing natural language interactions with log analysis.-
- FlicenseNot gradedqualityDmaintenanceProvides read-only access to local Beeper message history on macOS, enabling users to search conversations, read messages, and list recent chats through natural language queries. Supports both SQLite and IndexedDB storage formats with privacy-focused local-only operation.1-
- FlicenseNot gradedqualityDmaintenanceEnables natural-language querying of historical NBA game data from a read-only SQLite database.-
- FlicenseNot gradedqualityCmaintenanceEnables read-only querying of multiple databases via JDBC, supporting Tibero, Oracle, PostgreSQL, MySQL, etc., through natural language.-