Ledger CLI MCP Server
mcp-server-ledger:Ledger CLI MCP 服务器
概述
一个模型上下文协议服务器,用于与Ledger CLI交互。Ledger CLI 是一个功能强大的复式记账系统,可通过命令行访问。该服务器允许大型语言模型通过 Ledger CLI 工具查询和分析您的财务数据。
该 MCP 服务器通过标准化接口公开 Ledger CLI 的功能,使 AI 助手可以轻松帮助您完成财务报告、预算分析和会计任务。
Related MCP server: Lunch Money MCP Server
特征
服务器提供以下映射到 Ledger CLI 命令的工具:
ledger_balance显示账户余额,并提供强大的过滤选项
输入:查询模式、日期范围、显示选项
返回:格式化的余额报告
ledger_register显示交易记录及详细历史记录
输入:查询模式、日期范围、排序选项
返回:格式化的寄存器报告
ledger_accounts列出分类账文件中的所有账户
输入:可选查询模式
返回:匹配账户列表
ledger_payees列出交易的所有收款人
输入:可选查询模式
返回:匹配收款人列表
ledger_commodities列出所有使用的商品(货币)
输入:可选查询模式
返回:匹配商品列表
ledger_print以账本格式打印交易
输入:查询模式、日期范围
返回:格式化的分类帐条目
ledger_stats显示有关分类帐文件的统计信息
输入:可选查询模式
返回:分类账的统计摘要
ledger_budget显示预算分析
输入:查询模式、日期范围、报告期
返回:预算报告
ledger_raw_command运行原始 Ledger CLI 命令
输入:字符串列表形式的命令参数
返回:以文本形式输出的命令
先决条件
必须安装Ledger CLI并将其添加到你的 PATH 中
包含您的财务数据的有效分类账文件
安装
使用 uv(推荐)
安装和运行此服务器的最简单方法是使用uv :
uv sync配置
服务器需要你的 Ledger 文件的路径。可以通过以下方式提供:
LEDGER_FILE环境变量启动服务器时的命令行参数
与 Claude Desktop 一起使用
将其添加到您的claude_desktop_config.json中:
"mcpServers": {
"ledger": {
"command": "uv",
"args": [
"run",
"--env-file",
"/path/to/your/.env", // Optional: to set LEDGER_FILE
"--with",
"mcp[cli]",
"mcp",
"run",
"<repo_path>/main.py" // Path to the main.py file in this repository
]
}
}使用示例
配置完成后,您可以向 AI 助手询问有关您的财务数据的问题:
“显示我上个月的支出”
“我所有账户的当前余额是多少?”
“列出与亚马逊的所有交易”
“2023年我在食品杂货上花了多少钱?”
“显示我第一季度的预算表现”
AI 将通过服务器使用适当的 Ledger CLI 命令来获取信息。
调试
如需更详细的本地测试:
mcp dev main.py发展
本服务器使用模型上下文协议 Python SDK构建。有关 MCP 以及如何开发 MCP 服务器的更多信息,请参阅官方文档。
为该项目做出贡献:
克隆存储库
安装开发依赖项
进行更改
使用 MCP 检查器或与 Claude Desktop 集成进行测试
安全注意事项
此服务器会对您的财务数据运行 Ledger CLI 命令。虽然它包含防止命令注入的基本验证,但您仍应:
仅与可信赖的客户一起使用
注意公开的文件路径
执行前检查所有命令
执照
此 MCP 服务器采用 MIT 许可证。您可以根据许可证条款自由使用、修改和分发它。
Available Tools
9 toolsledger_accountsC
List all accounts
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all accounts' implies a read-only operation, but it doesn't specify whether this is a safe query, if it requires authentication, what the output format might be, or if there are any rate limits. For a tool with no annotation coverage, this leaves significant behavioral gaps that could affect agent decision-making.
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 extremely concise at just three words, with no wasted language. It's front-loaded with the core action and resource, making it easy to parse quickly. For a simple listing tool, this brevity is appropriate and efficient.
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?
Given the complexity of a ledger system with multiple sibling tools, no annotations, no output schema, and incomplete parameter documentation, the description is inadequate. It doesn't explain what an 'account' means in this context, how the listing is formatted, or how it relates to other ledger operations. For a tool in a potentially complex domain, more context is needed to ensure proper usage.
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 description mentions no parameters, but the input schema has one parameter ('query') with 0% description coverage in the schema itself. The description doesn't compensate by explaining what 'query' does or how it filters accounts, leaving the parameter undocumented. However, with only one parameter and a baseline expectation, this is minimally adequate but lacks detail.
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 'List all accounts' clearly states the action (list) and resource (accounts), making the basic purpose understandable. However, it doesn't differentiate this tool from its siblings like 'ledger_balance' or 'ledger_register', which might also involve account-related operations. The purpose is stated but lacks specificity about what makes this tool unique in the ledger context.
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 description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools like 'ledger_balance', 'ledger_register', and 'ledger_stats', it's unclear if this is the primary account listing tool or if others serve overlapping purposes. There's no mention of prerequisites, context, or exclusions that would help an agent choose appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_balanceD
Show account balances
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate whether this is a read-only operation, what permissions might be required, whether it has side effects, how results are formatted, or any rate limits. The simple phrase 'Show account balances' provides no behavioral context beyond the basic action implied by the verb 'show'.
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 extremely concise at just three words, with no wasted language. It's front-loaded with the core action ('Show account balances') and contains no unnecessary elaboration. While this conciseness comes at the cost of completeness, the description itself is structurally efficient with every word serving a purpose.
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?
Given the complexity (10 parameters with various date, grouping, and filtering options), lack of annotations, and absence of an output schema, the description is completely inadequate. It doesn't explain what the tool returns, how to interpret results, what the various parameters do, or when to use this versus other ledger tools. For a tool with this level of parameter richness, the minimal description fails to provide the necessary context for effective use.
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 description mentions no parameters at all, while the input schema reveals 10 parameters with 0% schema description coverage (all parameters have descriptions in the schema itself, but the description field provides no additional context). For a tool with this many parameters (begin_date, end_date, query, daily, monthly, etc.), the description should at least hint at filtering or grouping capabilities, but it provides zero parameter guidance beyond what's in the 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 'Show account balances' is a tautology that essentially restates the tool name 'ledger_balance'. It provides minimal information beyond the name itself, failing to specify what kind of balances (e.g., current, historical, filtered) or for what scope (all accounts, specific accounts). While it indicates the general domain (account balances), it lacks the specificity needed to distinguish it from potential sibling tools like 'ledger_register' or 'ledger_stats'.
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 description provides no guidance on when to use this tool versus alternatives. There is no mention of context, prerequisites, or comparisons to sibling tools like 'ledger_accounts' or 'ledger_register'. An AI agent would have no indication of whether this is for summary balances, detailed transaction listings, or other purposes, making it impossible to make an informed choice among the available ledger tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_budgetD
Show budget report
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. 'Show budget report' gives no indication of whether this is a read-only operation, what permissions might be required, whether it has side effects, how results are formatted, or any rate limits. The description provides zero behavioral context beyond the minimal implication that it displays information rather than modifies it.
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 maximally concise at just two words. While severely under-specified, it contains zero wasted language and is perfectly front-loaded. Every word (both of them) serves the core purpose of identifying the tool's function, though that function remains poorly defined.
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?
Given the tool's apparent complexity (7 parameters for generating budget reports with date ranges and grouping options), no annotations, no output schema, and 0% schema description coverage, the description is completely inadequate. 'Show budget report' fails to explain what a budget report contains, how it differs from other financial reports, what the parameters control, or what format the output takes. This leaves the agent unable to properly invoke or interpret results from this 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?
The description mentions no parameters whatsoever, while the input schema shows 7 parameters (begin_date, daily, end_date, monthly, query, weekly, yearly) with 0% schema description coverage. The agent receives no guidance about what 'budget report' means in terms of date ranges, grouping options, or filtering capabilities. This leaves all parameter semantics completely undocumented in both the schema and description.
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 'Show budget report' is a tautology that essentially restates the tool name 'ledger_budget' without adding meaningful specificity. It doesn't explain what a 'budget report' actually contains or how it differs from other ledger tools like 'ledger_balance' or 'ledger_stats'. The description lacks a clear verb+resource combination that would help an agent understand the tool's distinct function.
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 description provides absolutely no guidance on when to use this tool versus the 7 sibling tools available (ledger_accounts, ledger_balance, ledger_commodities, ledger_payees, ledger_print, ledger_raw_command, ledger_register, ledger_stats). There's no mention of appropriate contexts, prerequisites, or alternatives, leaving the agent with no basis for selecting this specific budget tool over other ledger-related operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_commoditiesC
List all commodities
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all commodities' implies a read-only operation, but it doesn't specify if it's safe, if there are rate limits, pagination, or what the output format looks like. For a tool with no annotations, this leaves significant behavioral gaps.
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 extremely concise with just three words, front-loaded and free of unnecessary details. It efficiently communicates the core action without waste, making it easy to parse quickly.
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?
Given no annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't explain what 'commodities' are in this context, how results are returned, or any constraints, making it inadequate for a tool that likely interacts with a ledger system.
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 input schema has 1 parameter with 0% description coverage in the schema itself, and the tool description doesn't mention any parameters. The description fails to compensate for the lack of schema documentation, leaving the 'query' parameter's purpose and usage unclear beyond what's minimally inferred from the 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 'List all commodities' clearly states the verb ('List') and resource ('commodities'), making the purpose understandable. However, it doesn't differentiate this tool from its siblings (like ledger_accounts or ledger_payees) which likely also list different resource types, so it's adequate but lacks sibling distinction.
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 description provides no guidance on when to use this tool versus alternatives. It doesn't mention context, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone, which is insufficient for effective selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_payeesC
List all payees
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'List all payees' implies a read-only operation, but it doesn't specify if it requires authentication, how results are returned (e.g., pagination, format), or any rate limits. For a tool with zero annotation coverage, this is insufficient to inform safe and effective use.
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 extremely concise with just three words, front-loaded to convey the core action immediately. There's no wasted language, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.
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?
Given the tool's simplicity (one parameter, no output schema, no annotations), the description is incomplete. It doesn't explain the parameter's role, the return format, or behavioral aspects like error handling. For even a basic tool, more context is needed to ensure the agent can invoke it correctly without guesswork.
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 description mentions no parameters, but the input schema has one parameter ('query') with 0% schema description coverage (the schema's description is generic). The description doesn't add any meaning beyond the schema, such as explaining what 'payees' are or how the 'query' filter works. With low coverage, it fails to compensate for the lack of schema details.
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 'List all payees' clearly states the verb ('List') and resource ('payees'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'ledger_accounts' or 'ledger_register' which might also list things, and 'all' is somewhat vague about scope. This is adequate but has clear gaps in specificity.
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 description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where other tools might be more appropriate, such as using 'ledger_register' for transaction details or 'ledger_accounts' for account listings. This lack of comparative context leaves usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_printC
Print transactions in ledger format
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. 'Print' suggests output generation, but the description doesn't disclose behavioral traits like output format details, pagination, performance characteristics, or whether this is a read-only operation. It mentions 'ledger format' but doesn't explain what that entails.
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 extremely concise (4 words) and front-loaded with the core purpose. However, this brevity comes at the cost of completeness - it's under-specified rather than efficiently informative.
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?
Given no annotations, no output schema, and 3 parameters with 0% schema coverage, the description is inadequate. For a tool with multiple parameters and sibling alternatives, it should explain more about what 'ledger format' means, when to use it, and what parameters control.
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 description mentions no parameters at all, while the schema has 3 parameters (begin_date, end_date, query) with 0% schema description coverage. The description fails to compensate for this complete lack of parameter documentation in the schema, leaving all parameters semantically undefined.
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 'Print transactions in ledger format' states a clear verb ('Print') and resource ('transactions'), but is vague about scope and format. It doesn't specify what 'ledger format' means or distinguish this from sibling tools like 'ledger_register' or 'ledger_raw_command' that might also output transaction data.
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?
No guidance is provided about when to use this tool versus alternatives. With multiple sibling tools for ledger data (accounts, balance, register, stats, etc.), the description offers no indication of when 'ledger_print' is appropriate versus other transaction-related tools like 'ledger_register'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_raw_commandD
Run a raw ledger command
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only states 'Run a raw ledger command', which does not reveal any behavioral traits such as whether it's read-only or destructive, what permissions are needed, potential side effects, error handling, or output format. This is inadequate for a tool that likely executes commands, where such details are critical.
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 extremely concise with a single sentence 'Run a raw ledger command', which is front-loaded and wastes no words. However, this conciseness comes at the cost of under-specification, but based on the scoring criteria, it earns a 5 for being appropriately sized with zero redundant 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?
Given the complexity of running raw commands, no annotations, no output schema, and 0% schema description coverage, the description is severely incomplete. It fails to provide necessary context such as command syntax, expected behaviors, error cases, or how it relates to sibling tools, making it inadequate for safe and effective use.
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 input schema has 1 parameter with 0% description coverage, and the description adds no meaning beyond the schema. It does not explain what 'raw ledger command arguments' are, their format, examples, or constraints. For a parameter named 'command' that accepts an array of strings, this lack of semantic context makes it difficult for an agent to use the tool correctly.
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 'Run a raw ledger command' is a tautology that essentially restates the tool name 'ledger_raw_command'. It specifies the verb 'run' and resource 'ledger command', but lacks specificity about what a 'raw ledger command' entails or how it differs from the 8 sibling tools (e.g., ledger_accounts, ledger_balance). This makes it vague and minimally helpful for distinguishing its purpose.
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 description provides no guidance on when to use this tool versus the 8 sibling tools. It does not mention any context, prerequisites, or alternatives, leaving the agent with no information to make an informed choice among the ledger-related tools. This is a significant gap for a tool with multiple siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_registerD
Show transaction register
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. 'Show transaction register' implies a read-only operation but provides no information about permissions needed, data format returned, pagination, rate limits, or whether this is a live view versus cached data. For a tool with 10 parameters and no annotation coverage, this is completely inadequate.
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 extremely concise at just three words, but this brevity comes at the cost of being under-specified rather than efficient. While front-loaded with the core action, it lacks the necessary detail for a tool with this complexity. The structure is simple but incomplete.
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?
Given the tool's complexity (10 parameters, no output schema, no annotations), the description is completely inadequate. It doesn't explain what a 'transaction register' contains, how it differs from other ledger tools, what parameters control, or what format the output takes. This leaves too many gaps for effective tool selection and 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?
The description mentions no parameters whatsoever, while the schema has 10 parameters with 0% description coverage. The description doesn't even hint at the existence of date filtering, grouping options, or search capabilities that the parameters enable. This leaves the agent with no semantic understanding of what the parameters control.
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 'Show transaction register' is a tautology that essentially restates the tool name 'ledger_register'. It doesn't specify what a 'transaction register' contains or how it differs from sibling tools like ledger_print or ledger_balance. While it indicates a display/read operation, it lacks specificity about scope or content.
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?
There is absolutely no guidance about when to use this tool versus alternatives. With multiple sibling tools available (ledger_print, ledger_balance, ledger_stats, etc.), the description provides no context about when this specific register view is appropriate versus other ledger reporting tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ledger_statsC
Show statistics about the ledger file
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('Show statistics') without any details on output format, performance, error handling, or other behavioral traits. This is inadequate for a tool with parameters and no output schema.
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 a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool, though its brevity contributes to gaps in other dimensions. It's front-loaded and clear in its minimal form.
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?
Given the complexity (1 parameter, no annotations, no output schema, and multiple sibling tools), the description is incomplete. It fails to explain what statistics are shown, how to use the parameter, or how it differs from other tools. This leaves significant gaps for an AI agent to operate effectively.
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 input schema has 1 parameter with 0% description coverage, and the tool description provides no information about parameters. It doesn't explain what the 'query' parameter does, how to use it, or what 'Filter for statistics' means in practice. This leaves the parameter undocumented.
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 'Show statistics about the ledger file' states a clear verb ('Show') and resource ('ledger file'), but it's vague about what specific statistics are shown and doesn't differentiate from sibling tools like 'ledger_balance' or 'ledger_register' that might also show statistical information. It provides a basic purpose but lacks specificity.
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 description offers no guidance on when to use this tool versus alternatives like 'ledger_balance' or 'ledger_register', nor does it mention any prerequisites or exclusions. It's a generic statement with no contextual usage information, leaving the agent to guess based on tool names alone.
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
v1.0.0- First observed
ledger_accounts - First observed
ledger_balance - First observed
ledger_budget - First observed
ledger_commodities - First observed
ledger_payees - First observed
ledger_print - First observed
ledger_raw_command - First observed
ledger_register - First observed
ledger_stats
TDQS
Scored across 9 tools
Every tool has a clearly distinct purpose with no ambiguity. Each targets a specific aspect of ledger functionality (e.g., accounts, balances, budget, commodities, payees, printing, raw commands, register, stats), and their descriptions make it easy to differentiate between them.
All tool names follow a consistent 'ledger_' prefix with a descriptive noun or noun phrase (e.g., ledger_accounts, ledger_balance). This predictable pattern enhances readability and makes the tool set easy to navigate.
With 9 tools, the count is well-scoped for a ledger CLI server. Each tool serves a distinct and useful function in managing financial data, and there are no redundant or unnecessary tools, making the set appropriately sized for its domain.
The tool set provides comprehensive coverage for querying and reporting on ledger data, including accounts, balances, transactions, and statistics. A minor gap is the lack of tools for creating or modifying ledger entries (e.g., add_transaction), but agents can work around this using ledger_raw_command for such operations.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Personal finance ledger for AI agents — query spending, track bills, forecast cash flow.
Log, query, and edit expenses, budgets, and accounts in Ledgy from any MCP-compatible AI assistant.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn experimental server implementing the Model Context Protocol to allow AI assistants to query and analyze financial data stored in Beancount ledger files using the Beancount Query Language.53MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that allows AI assistants to interact with Lunch Money accounts, enabling management of transactions, categories, budgets, and other financial data through natural language commands.MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that provides AI assistants like Claude with secure, read-only access to MoneyWiz financial data for natural language queries and financial analytics.13MIT
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides programmatic access to Firefly III personal finance management. It enables AI assistants to manage accounts, transactions, budgets, and more through natural language.58AGPL 3.0