Lightning Memory
Provides persistent memory, vendor reputation, spending anomaly detection, and payment safety gates for AI agents making L402 payments over the Bitcoin Lightning Network.
Click on "Install 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., "@Lightning Memorycheck bitrefill.com reputation"
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.
Lightning Memory
Persistent memory for AI agents in the Lightning economy.
The Problem
AI agents spend sats over Lightning via L402 — but they can't remember what they bought. Every session starts from zero. Every vendor is a stranger. Every price is accepted at face value. An agent that paid 500 sats yesterday doesn't know if today's 5,000 sat invoice is a price spike or normal.
Related MCP server: giskard-memory
The Solution
L1: Bitcoin — settles
L2: Lightning — pays
L3: Lightning Memory — remembersLightning Memory gives agents persistent memory, vendor intelligence, and payment safety gates. Agents learn from their spending history, track vendor reputations, detect price anomalies, enforce budgets, and share trust signals with other agents.
Interactive Demo — watch an agent learn, get rugged, and route around bad actors.
Building the Agent Economy — trust, budgets, compliance, and the memory marketplace.
Who Is This For
Agents making L402 payments that need vendor reputation and spending discipline
Developers building autonomous agents on Bitcoin/Lightning
Anyone running an MCP-compatible AI agent (Claude, GPT, or any MCP client)
Quick Start
pip install lightning-memory
lightning-memory # starts MCP serverConfigure in Claude Code
{
"mcpServers": {
"lightning-memory": {
"command": "lightning-memory"
}
}
}Configure in Claude Desktop
{
"mcpServers": {
"lightning-memory": {
"command": "python",
"args": ["-m", "lightning_memory.server"]
}
}
}How It Compares
Feature | Lightning Memory | Mem0 | Raw file storage | No memory |
Lightning/L402 awareness | Yes | No | No | No |
Vendor reputation tracking | Yes | No | Manual | No |
Spending anomaly detection | Yes | No | No | No |
Nostr identity (BIP-340) | Yes | No | No | No |
Relay sync (NIP-78) | Yes | No | No | No |
Full-text + semantic search | Yes | Yes | No | No |
Agent-to-agent knowledge markets | Yes (L402 gateway) | No | No | No |
Budget enforcement | Yes | No | No | No |
KYC/trust profiles | Yes | No | No | No |
Payment pre-flight gate | Yes | No | No | No |
Contradiction detection | Yes | No | No | No |
Local-first / offline | Yes | Cloud | Yes | N/A |
MCP native | Yes | Plugin | No | No |
Zero config | Yes | API key required | Manual setup | N/A |
Tools (22)
Memory
Tool | Description |
| Store a memory (transaction, vendor, preference, error, decision) |
| Search by relevance (FTS5 + optional semantic search) |
| List memories with type/time filters |
| Edit content or metadata with audit trail |
| Sync with Nostr relays (push/pull) |
| Export as NIP-78 Nostr events |
memory_store(
content="Paid 500 sats to bitrefill.com for a $5 Amazon gift card via L402.",
type="transaction",
metadata='{"vendor": "bitrefill.com", "amount_sats": 500}'
)
memory_query(query="bitrefill payment history", limit=5)
# → recency-weighted results with dedup and contradiction alertsLightning Intelligence
Tool | Description |
| Reputation score from transaction history |
| Spending breakdown by vendor and protocol |
| Detect if a payment is abnormally high |
ln_vendor_reputation(vendor="bitrefill.com")
# → {reputation: {total_txns: 12, success_rate: 0.92, avg_sats: 450}, recommendation: "reliable"}
ln_anomaly_check(vendor="bitrefill.com", amount_sats=5000)
# → {anomaly: {verdict: "high", context: "5000 sats is 11.1x the historical average..."}}Payment Safety
Tool | Description |
| Pre-flight gate: budget + anomaly + trust check before payment |
| Set per-vendor spending limits (per txn, per day, per month) |
| Check spending against limits |
| Gateway earnings and L402 payment stats |
ln_preflight(vendor="bitrefill.com", amount_sats=500)
# → {decision: {verdict: "approve", budget_remaining_today: 4500, trust_score: 0.89}}
# If the vendor suddenly charges 50x:
ln_preflight(vendor="bitrefill.com", amount_sats=25000)
# → {decision: {verdict: "reject", reasons: ["exceeds daily limit of 5000 sats"]}}Trust & Compliance
Tool | Description |
| Full trust profile (KYC + reputation + community score) |
| Publish NIP-85 trust attestation to Nostr relays |
| Store a KYA (Know Your Agent) attestation |
| Look up an agent's compliance status |
| Store LNURL-auth session records |
| Look up LNURL-auth sessions |
| Generate structured compliance export |
Marketplace
Tool | Description |
| Find remote Lightning Memory gateways via Nostr |
| Query a remote gateway via L402 micropayment |
ln_discover_gateways(operation="memory_query")
# → {count: 2, gateways: [{url: "https://gw1.example.com", operations: {...}}, ...]}
ln_remote_query(
gateway_url="https://gw.example.com",
operation="ln_vendor_reputation",
params='{"vendor": "openai"}'
)
# → Pays 3 sats, returns remote agent's vendor intelligenceArchitecture
Nostr identity: Agent identity = Nostr keypair (BIP-340). No accounts, no API keys.
Local-first: SQLite with FTS5 full-text search + optional ONNX semantic search. Works offline.
Nostr sync: Memories written as NIP-78 events to relays. Portable, tamper-proof.
L402 payments: Pay-per-query gateway. 1-10 sats per operation.
Memory quality: Deduplication, contradiction detection, noise filtering, recency-weighted ranking, access tracking.
L402 Gateway
Run an L402 pay-per-query HTTP gateway. Other agents pay Lightning micropayments to access your agent's memory — no API keys, no accounts.
pip install lightning-memory[gateway]
lightning-memory-gateway # Listening on 0.0.0.0:8402How L402 Works
Agent Gateway Phoenixd
| | |
|-- GET /memory/query?q=... --->| |
|<-- 402 + Lightning invoice ---|--- create_invoice -------->|
| |<-- bolt11 + payment_hash --|
| | |
| [pay invoice via Lightning] | |
| | |
|-- GET + L402 token ---------->| |
| (macaroon:preimage) |--- verify preimage ------->|
|<-- 200 + query results -------| |Endpoints
Endpoint | Method | Price | Description |
| GET | Free | Gateway status, pricing, node info |
| GET | Free | Health check |
| POST | 3 sats | Store a memory |
| GET | 2 sats | Search memories by relevance |
| GET | 1 sat | List memories with filters |
| GET | 3 sats | Vendor reputation report |
| GET | 2 sats | Spending summary |
| POST | 3 sats | Payment anomaly detection |
| POST | 3 sats | Pre-flight payment gate |
| GET | 2 sats | Vendor trust profile |
| GET | 1 sat | Budget rules and spending |
| GET | 10 sats | Compliance report export |
Phoenixd Setup
Download and run Phoenixd (listens on
localhost:9740)Fund it with ~10,000 sats for initial channel opening
Configure:
~/.lightning-memory/config.json→{"phoenixd_password": "<from ~/.phoenix/phoenix.conf>"}Start:
lightning-memory-gateway
Docker
PHOENIXD_PASSWORD=your-password docker compose upCLI Commands
lightning-memory # Start MCP server
lightning-memory stats # Memory statistics dashboard
lightning-memory export json # Export memories as JSON
lightning-memory export csv # Export memories as CSV
lightning-memory relay-status # Check Nostr relay connectivity
lightning-memory-gateway # Start L402 HTTP gateway
lightning-memory-manifest # Generate gateway discovery manifestRelay Configuration
Default relays: wss://relay.damus.io, wss://nos.lol, wss://relay.nostr.band
Customize in ~/.lightning-memory/config.json:
{
"relays": ["wss://relay.damus.io", "wss://nos.lol", "wss://relay.primal.net"],
"sync_timeout_seconds": 30,
"max_events_per_sync": 500
}Relay | Speed | Reliability | Notes |
| Fast | High | Most popular, good uptime |
| Fast | High | Reliable, good NIP-78 support |
| Medium | Medium | Search-focused, may be slow |
| Fast | High | Well-maintained |
| Fast | High | Paid relay, less spam |
Optional: Semantic Search
Add ONNX-based semantic similarity search alongside FTS5 keyword search:
pip install lightning-memory[semantic]Queries then use hybrid ranking: FTS5 BM25 + cosine similarity with reciprocal rank fusion. "Which vendors are reliable for transcription" matches memories containing "whisper API" and "audio-to-text" even without exact keyword overlap.
Data Storage
~/.lightning-memory/
memories.db # SQLite database
keys/
private.key # Nostr private key (chmod 600)
public.key # Nostr public key (your agent identity)Roadmap
Phase 1: MCP server with local SQLite storage
Phase 2: Lightning intelligence (vendor reputation, spending summary, anomaly detection)
Phase 3: Nostr relay sync (NIP-78, Schnorr signing, bidirectional sync)
Phase 4: L402 payment gateway (macaroons, Phoenixd, HTTP gateway)
Phase 5: Compliance & trust (budget enforcement, vendor KYC, community reputation, pre-flight gate)
Phase 6: Memory marketplace (gateway discovery, remote L402 queries, gateway client)
Phase 7: Agent reliability (semantic search, deduplication, contradiction detection, circuit breakers)
Star History
License
MIT
Available Tools
22 toolsln_agent_attestA
Store an attestation about an agent's identity and compliance status.
Used for Know Your Agent (KYA) — agents self-attesting, operators attesting their agents, or third-party KYA providers.
Args: agent_pubkey: The agent's Nostr public key (64 hex chars). owner_id: Owner identifier (email, company name, etc.). jurisdiction: Legal jurisdiction (e.g., "US", "EU", "SG"). compliance_level: One of: unknown, self_declared, kyc_verified, regulated_entity. source: Verification source (e.g., "manual", "sumsub", "trulioo").
Returns: The stored attestation record.
| Name | Required | Description | Default |
|---|---|---|---|
| agent_pubkey | Yes | ||
| owner_id | No | ||
| jurisdiction | No | ||
| compliance_level | No | self_declared | |
| source | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility. It indicates a write operation ('store') but fails to disclose behavioral traits like idempotency, overwrite behavior, permission requirements, or side effects. Such gaps hinder safe 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 a well-structured docstring with a one-line summary, then Args and Returns sections. Every sentence adds value, and the most important information (purpose) appears first. No extraneous content.
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 output schema, the description states 'Returns: The stored attestation record,' which is minimal. It lacks details on return format, error conditions, or pagination. For a tool with 5 parameters and no annotations, this is adequate but incomplete; more output context would improve usability.
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's Args section is essential. It provides meaningful details: agent_pubkey format (64 hex chars), owner_id type (email, company name), jurisdiction examples, compliance_level enumerated values, and source examples. This fully compensates for the schema's lack of descriptions.
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 clearly states 'Store an attestation about an agent's identity and compliance status.' It uses a specific verb ('store') and resource ('attestation'), and distinguishes from siblings such as ln_agent_verify (likely verification) and ln_trust_attest (different trust 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 mentions 'Used for Know Your Agent (KYA)' and lists use cases (self-attesting, operator, third-party). However, it does not explicitly state when not to use this tool or suggest alternatives, such as ln_trust_attest for other attestation types. Usage context is clear but lacks exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_agent_verifyA
Look up an agent's compliance attestation.
Args: agent_pubkey: The agent's Nostr public key to verify.
Returns: Attestation details or {status: "unknown"} if not found.
| Name | Required | Description | Default |
|---|---|---|---|
| agent_pubkey | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description adequately discloses the tool's behavior: it performs a lookup and returns either attestation details or a status object. It does not mention side effects, permissions, or rate limits, but given the simple read operation, the description is sufficient.
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 clear header and structured Args section. Every sentence adds value: the first line states purpose, and the Args and Returns explain the single parameter and output. No unnecessary 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 tool's simplicity (one required parameter, no output schema), the description covers all necessary aspects: purpose, parameter, and return format (including the 'unknown' status case). It is complete for an agent to correctly select and invoke the 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 input schema has 0% description coverage, so the description carries the full burden. It defines the parameter 'agent_pubkey' as 'The agent's Nostr public key to verify', adding meaningful context beyond the schema's type field. This fully compensates for the lack of schema descriptions.
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 clearly states the verb 'look up' and the resource 'compliance attestation', making the tool's purpose explicit. It distinguishes itself from siblings like ln_agent_attest, which likely creates attestations, by focusing on verification.
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 implies usage for checking existing attestations but does not explicitly state when to use this tool versus alternatives like ln_agent_attest for creation. The context is clear but not prescriptive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_anomaly_checkA
Check if a proposed payment amount is normal for a vendor.
Use this before making a payment to catch price anomalies. Compares the proposed amount against historical averages.
Args: vendor: Vendor name or domain. amount_sats: Proposed payment amount in satoshis.
Returns: Anomaly report: verdict (normal/high/first_time), context, and historical average.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | ||
| amount_sats | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It discloses that the tool compares against historical averages and returns a verdict (normal/high/first_time) with context and average. It does not mention error handling or side effects, but the core behavior is transparent.
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 compact (~70 words), with a clear structure: one-line purpose, usage note, args list, return summary. Every sentence adds value, and the most critical info is front-loaded.
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 output schema, the description adequately covers inputs and returns. It lacks explicit error cases or edge behavior (e.g., unknown vendor), but for a straightforward anomaly check tool, the level of detail is sufficient.
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 coverage is 0% (no descriptions in schema), but the description compensates by explaining vendor (name/domain) and amount_sats (proposed payment in satoshis). This adds meaning beyond the type declarations.
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 clearly states the tool's purpose: 'Check if a proposed payment amount is normal for a vendor.' It specifies the verb (Check) and resource (payment amount anomaly), and distinguishes from siblings like ln_budget_check by focusing on price anomaly vs historical averages.
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 explicitly says 'Use this before making a payment to catch price anomalies,' providing clear context. It does not explicitly exclude alternatives, but the usage is well-defined and sufficiently distinct from sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_auth_lookupA
Check if an LNURL-auth session exists with a vendor.
Args: vendor: Vendor name or domain to check.
Returns: Session details if found, or {has_session: false}.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | 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. It states the return format ('Session details if found, or {has_session: false}') and implies a read-only operation, but does not disclose permissions, side effects, or error conditions.
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 concise with two sentences and a docstring-style argument list. It is front-loaded with the core action, though the 'Args:' section is somewhat redundant given the schema.
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 simple lookup tool with no output schema, the description adequately explains the return values and covers the essential behavior. No additional context is needed.
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 coverage is 0%, but the description adds meaning by specifying 'Vendor name or domain to check,' which clarifies the parameter beyond the schema's bare 'Vendor' string. This adds value for an agent.
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 clearly states the tool's purpose: 'Check if an LNURL-auth session exists with a vendor.' This is a specific verb and resource, and it is distinguishable from sibling tools like ln_auth_session (which likely creates or manages sessions).
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 on when to use this tool versus alternatives like ln_auth_session or ln_agent_verify. The description does not mention prerequisites or context for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_auth_sessionB
Store or update an LNURL-auth session record.
Record-keeping for externally-established LNURL-auth sessions.
Args: vendor: Vendor name or domain. linking_key: The LNURL-auth linking key for this vendor. session_state: Session state: active, expired, or revoked.
Returns: The stored session record.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | ||
| linking_key | Yes | ||
| session_state | No | active |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that it stores/updates and accepts session states active/expired/revoked, but no annotations exist. It does not explain side effects (e.g., overwrite behavior), required permissions, or idempotency. The behavioral disclosure is minimal for a mutation tool.
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 concise with a clear one-liner action, followed by structured Args/Returns. It is front-loaded and contains no unnecessary words.
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 has 3 parameters and no output schema or annotations, the description covers basic purpose and parameter semantics. However, it lacks context about LNURL-auth and the record-keeping use case, making it minimally 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?
Despite 0% schema coverage, the description adds basic meaning to parameters: 'Vendor name or domain', 'The LNURL-auth linking key', and session state options. However, it lacks detailed format or validation hints, so it partially compensates.
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 clearly states 'Store or update an LNURL-auth session record' with a specific verb (store/update) and resource (session record). It distinguishes from sibling ln_auth_lookup which retrieves sessions.
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 implies usage for record-keeping of externally-established sessions but does not explicitly state when to use this over ln_auth_lookup or when not to use it. No exclusions or alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_budget_checkA
List budget rules and current spending status.
Shows all active budget rules, or details for a specific vendor including how much has been spent today and this month.
Args: vendor: Optional vendor to check. If omitted, lists all rules.
Returns: Budget rules with current spending against limits.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It mentions listing and checking, implying read-only, but does not explicitly state it is read-only, required permissions, or any side effects. The lack of detail is a 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 concise and well-structured: a single-sentence purpose, then a bullet-style breakdown of args and returns. Every sentence earns its place, with no wasted words.
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 optional parameter, no output schema), the description adequately covers input and conceptual output (budget rules with spending against limits). It could be more specific about the return structure, but it is sufficient for this low-complexity 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 schema has 0% description coverage, but the description fully explains the 'vendor' parameter: optional, if omitted lists all rules, if provided shows details including today and month spending. This compensates completely for the missing schema 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 clearly states the verb 'list' and the resource 'budget rules and current spending status', explaining two modes: list all or check specific vendor. This distinguishes it from sibling tools like ln_budget_set (set rules) and ln_spending_summary (summarize spending).
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 implies usage for checking budget rules and spending, but does not explicitly state when not to use it or mention alternative tools like ln_budget_status or ln_spending_summary. Context is clear but lacks guidance on exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_budget_setA
Set spending limits for a vendor.
Creates budget rules that the pre-flight gate enforces. Any payment exceeding these limits will be rejected.
Args: vendor: Vendor name or domain (e.g., "bitrefill.com"). max_sats_per_txn: Maximum sats allowed per single transaction. max_sats_per_day: Maximum total sats per day to this vendor. max_sats_per_month: Maximum total sats per month to this vendor.
Returns: The created/updated budget rule.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | ||
| max_sats_per_txn | No | ||
| max_sats_per_day | No | ||
| max_sats_per_month | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that the tool creates budget rules enforced by a pre-flight gate and that exceeding limits leads to rejection. However, it omits details on whether rules are overwritten, authorization requirements, or side effects. Since no annotations exist, more behavioral context would be beneficial.
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?
Extremely concise: one introductory sentence, followed by a clear bulleted Args list and Returns note. No redundant information; every element earns its place. Ideal front-loading of 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?
The description covers the return value (created/updated rule) and the enforcement mechanism. It lacks an explicit statement about overwriting existing rules, but given the tool's simplicity and absence of output schema, it is sufficiently complete for an agent to use correctly.
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?
Each parameter is explained with context: 'vendor' includes example domain, and limits include 'Maximum sats allowed' with clear scope (per transaction, day, month). This adds significant meaning beyond the schema's minimal type and title, compensating well for the 0% schema coverage signal.
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?
Clear verb 'Set' and resource 'spending limits' directly describe the tool's purpose. It distinctly differentiates from sibling tools like ln_budget_check and ln_budget_status, which handle checking or status rather than creation/update.
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 implies usage for setting limits enforced by a pre-flight gate, but it does not explicitly state when to prefer this tool over alternatives like ln_budget_check. No 'when not to use' or comparative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_budget_statusA
Check L402 gateway earnings and payment stats.
Shows total sats earned from L402 gateway payments, broken down by operation. Reads from locally stored payment records (logged by the gateway).
Returns: Earnings summary: total sats, payment count, breakdown by operation.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description states the tool reads from locally stored payment records (read-only) and returns an earnings summary. Without annotations, it adequately covers behavior, though it could mention data freshness or potential staleness.
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 three short sentences that front-load the purpose. Every sentence is meaningful and there is no redundancy.
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 (no parameters, no output schema), the description adequately covers purpose and return values. It could mention that data is local and might not reflect real-time gateway state, but overall 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?
No parameters exist, so the description adds value by explaining the output (total sats, count, breakdown) and data source. This clarifies what the tool returns, which is beyond the empty 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 clearly states the tool checks L402 gateway earnings and payment stats, with specific verb 'Check' and resource. It distinguishes from sibling tools by focusing on earnings and payment stats, which is not covered by other ln_ tools.
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 like ln_budget_check or ln_spending_summary. It does not specify prerequisites or conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_compliance_reportA
Generate a structured compliance report.
Produces a comprehensive report covering agent identity, transactions, budget rules, vendor KYC status, anomaly flags, and trust attestations. Designed for regulatory compliance export.
Args: since: Time period for temporal data. Relative: "1h", "24h", "7d", "30d". Current-state data (budget rules, KYC) is always included. format: Output format. Only "json" supported in v1.
Returns: Compliance report as a structured dict.
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | 30d | |
| format | No | json |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses important behavioral context: current-state data (budget rules, KYC) is always included regardless of the 'since' parameter. However, it does not explicitly confirm the tool is read-only or describe side effects, though 'generate a report' implies no mutations.
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 concise, front-loaded with the main purpose, and well-structured with Args and Returns sections. Every sentence adds value without repetition.
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 output schema, the description adequately states the return is a structured dict and lists what it covers. While it does not detail the dict fields, the listing of components is sufficient for an agent to understand the tool's output scope.
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 0% description coverage, so the description fully compensates by explaining both parameters: 'since' with relative time values and current-state inclusion, and 'format' with the only supported value 'json'. This adds meaning beyond 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 clearly states the tool generates a structured compliance report and lists all major components (agent identity, transactions, budget rules, KYC, anomaly flags, trust attestations), making it distinct from sibling tools that focus on individual checks.
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 notes the tool is for regulatory compliance export, implying comprehensive use, but does not explicitly state when to use it versus alternatives like individual check tools (e.g., ln_anomaly_check). No exclusion or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_discover_gatewaysA
List known Lightning Memory gateways discovered via Nostr relays.
Args: operation: Optional filter — only return gateways offering this operation (e.g., "memory_query", "ln_vendor_reputation").
Returns: List of known gateways with URL, operations, pricing, and last seen time.
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that the tool returns a list with URL, operations, pricing, and last seen time, and supports an optional filter. However, it does not mention any side effects, data freshness, or potential limitations, though no annotations are provided.
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 concise with bullet points for arguments and returns, no fluff. Every sentence adds value.
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 simple tool with one optional parameter and no output schema, the description fully covers purpose, filtering behavior, and return structure.
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 has 0% description coverage, but the description explains the 'operation' parameter as an optional filter with examples, adding significant meaning beyond the schema's bare type definition.
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 clearly states the tool lists known Lightning Memory gateways discovered via Nostr relays, using specific verb 'list' and resource. It distinguishes from sibling tools, which are about agent attestation, compliance, memory editing, etc., not gateway discovery.
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 on when to use this tool versus alternatives. It does not mention prerequisites, complementary tools, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_preflightA
Pre-flight check before making a payment.
Runs budget limits, anomaly detection, and trust verification to produce an approve/reject/escalate decision. Use this before every payment to catch overspending, price anomalies, and unverified vendors.
Args: vendor: Vendor name or domain. amount_sats: Proposed payment amount in satoshis.
Returns: Decision: verdict (approve/reject/escalate), reasons, budget remaining, anomaly status, and trust score.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | ||
| amount_sats | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses the three types of checks (budget, anomaly, trust) and the key elements of the return value (verdict, reasons, budget remaining, anomaly status, trust score). This is sufficient for a non-destructive verification tool.
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 well-structured with clear sections for purpose, usage, arguments, and returns. Each sentence adds value. No redundant or extraneous text.
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?
The tool has two required parameters and no output schema. The description thoroughly covers both parameters with meaningful descriptions, and includes a Returns section that details the decision structure. Given the simplicity of the tool, this is 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 descriptions are empty (0% coverage). The description's Args section adds meaning: 'vendor: Vendor name or domain' clarifies the format, and 'amount_sats: Proposed payment amount in satoshis' specifies the unit. This compensates for the lack of schema descriptions.
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?
Description explicitly states it is a 'pre-flight check before making a payment' and lists the specific checks (budget limits, anomaly detection, trust verification). It clearly distinguishes from sibling tools that are more specialized (e.g., ln_budget_check, ln_anomaly_check, ln_vendor_reputation) by being an integrated check.
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 says 'Use this before every payment to catch overspending, price anomalies, and unverified vendors.' This provides clear context on when to use it. It does not explicitly mention when not to use it or alternatives, but the purpose is clear enough that an agent would know this is the primary pre-flight check.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_remote_queryB
Query a remote Lightning Memory gateway via L402 micropayment.
Pays the gateway's Lightning invoice automatically via Phoenixd, then returns the query results. The payment is logged as a transaction memory.
Args: gateway_url: URL of the remote gateway (e.g., "https://gw.example.com"). operation: Operation to perform. One of: memory_query, memory_list, ln_vendor_reputation, ln_spending_summary, ln_anomaly_check, ln_preflight, ln_vendor_trust, ln_budget_check, ln_compliance_report. params: JSON string of operation-specific parameters.
Returns: Remote gateway's response data, or error details.
| Name | Required | Description | Default |
|---|---|---|---|
| gateway_url | Yes | ||
| operation | Yes | ||
| params | No | {} |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses automatic payment via Phoenixd and transaction logging, which adds context. However, with no annotations, it fails to mention whether the operation is read-only, what happens if payment fails, or any rate limits. More detail would improve transparency.
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 well-structured with a clear opening statement followed by parameter details. It avoids unnecessary words and is efficient, though slightly lengthy.
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 (micropayments, remote query) and lack of output schema or annotations, the description covers the core workflow. However, it lacks details on the return format (e.g., JSON structure) and possible error scenarios, leaving some gaps.
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?
Since schema description coverage is 0%, the description provides explanations for all three parameters (gateway_url, operation, params), including valid operations list and params as JSON string. This adds significant value over the schema, though the params description is somewhat vague.
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 clearly states it queries a remote Lightning Memory gateway and lists supported operations. However, it does not differentiate from sibling tools like 'ln_vendor_reputation' which share operation names, potentially causing confusion.
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 explains the tool's mechanism (L402 payment, Phoenixd) but gives no guidance on when to use this tool versus alternatives such as 'memory_query' or other sibling tools. There are no 'when to use' 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.
ln_spending_summaryB
Get a spending summary for budget awareness.
Shows total sats spent, broken down by vendor and protocol.
Args: since: Time period. Relative: "1h", "24h", "7d", "30d". Or Unix timestamp.
Returns: Spending breakdown with totals by vendor and protocol.
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | 30d |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility. It does not disclose whether the tool is read-only, safe, or has any side effects. While the output is described, behavioral traits like authentication needs or error handling are missing.
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 brief and front-loaded: one sentence for purpose, then structured Args and Returns. Every sentence adds value; no fluff.
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 simple tool with one optional parameter and no output schema, the description covers the main aspects. However, given the absence of annotations and sibling tools, a usage hint would improve completeness.
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 schema has 0% coverage, but the description explains the 'since' parameter format clearly: relative time periods (1h, 24h, 7d, 30d) or a Unix timestamp. This adds meaning beyond the schema's type and default.
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 clearly states it retrieves a spending summary for budget awareness, showing total sats spent broken down by vendor and protocol. This is a specific verb and resource, but it does not explicitly distinguish from sibling tools like ln_budget_check or ln_budget_status, which are related.
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 says 'for budget awareness' implying a review purpose, but provides no explicit guidance on when to use this tool versus alternatives (e.g., ln_budget_check). There are no when-not or exclusion statements.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_trust_attestA
Publish a trust attestation for a vendor.
Creates a NIP-85 Trusted Assertion and pushes it to Nostr relays. Other agents can pull these attestations to build community reputation.
Args: vendor: Vendor name or domain to attest. score: Trust score 0.0-1.0. If omitted, auto-calculated from local reputation (success_rate * volume factor). basis: Reason for the score (default: "transaction_history").
Returns: Attestation details including score and relay push status.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | ||
| score | No | ||
| basis | No | transaction_history |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must cover behavioral traits. It discloses creating a NIP-85 attestation and pushing to Nostr relays, and describes the return value. However, it omits details on idempotency, rate limits, permission requirements, or potential failure modes for the relay push.
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 concise and well-structured: a brief main statement followed by clear parameter and return value sections. No unnecessary words, and all information is front-loaded.
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 simple publish tool with 3 parameters, no output schema, and no annotations, the description sufficiently covers purpose, parameters, and return value. It lacks error examples or prerequisites, but given the low complexity, it is mostly 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 fully explains each parameter: vendor (name or domain), score (0.0-1.0 with auto-calculation logic), and basis (reason with default). This adds significant meaning beyond the schema's type/default information.
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 clearly states the tool publishes a trust attestation for a vendor, creates a NIP-85 Trusted Assertion, and pushes it to Nostr relays. It distinguishes itself from siblings like ln_agent_attest and ln_vendor_trust by focusing on vendor trust attestation with community reputation building.
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 implies usage context: when you want to publish a vendor trust attestation for community reputation. It does not explicitly state when not to use or compare to alternatives like ln_agent_attest, but the purpose is clear enough for an agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_vendor_reputationA
Check a vendor's reputation based on transaction history.
Use this before paying a vendor to see if they're reliable. Aggregates all past transactions to build a reputation score.
Args: vendor: Vendor name or domain (e.g., "bitrefill.com", "openai").
Returns: Reputation report: total transactions, total sats spent, success rate, average payment size, and tags.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It explains that it aggregates past transactions to build a reputation score and returns a report with specific fields. No side effects mentioned, but likely read-only.
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?
Concise and well-structured: purpose first, then usage, then args, then returns. Every sentence serves a purpose with no waste.
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 simple one-parameter tool with no output schema, the description fully explains what it does and what it returns, making it complete for agent understanding.
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 has one parameter 'vendor' with description in args including examples (e.g., 'bitrefill.com', 'openai'). Despite 0% schema description coverage, the description adds meaning beyond 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 clearly states 'Check a vendor's reputation based on transaction history.' It uses a specific verb (check) and resource (vendor reputation), and is distinct from sibling tools like ln_vendor_trust.
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?
Provides explicit guidance: 'Use this before paying a vendor to see if they're reliable.' Implies when to use but does not specify when not to use or alternatives, though clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ln_vendor_trustA
Get a vendor's full trust profile.
Combines KYC verification status, local transaction reputation, and community trust attestations (from Nostr NIP-85) into a unified trust profile.
Args: vendor: Vendor name or domain.
Returns: Trust profile: KYC status, jurisdiction, community score, attestation count, and local reputation data.
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It explains the aggregation behavior and return fields but does not disclose safety traits (e.g., read-only, permissions, rate limits). The description implies read-only, but does not explicitly state 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 concise (four sentences) and front-loaded with the main action. Each sentence provides essential information without redundancy.
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 output schema, the description adequately lists the return fields (KYC status, jurisdiction, community score, attestation count, local reputation). It could be improved by specifying the output structure (e.g., object) and potential errors.
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 no parameter description, so the description adds value by specifying 'Vendor name or domain.' This clarifies the expected format beyond the schema's bare type 'string.'
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 begins with a clear verb+resource: 'Get a vendor's full trust profile.' It then specifies what the profile combines (KYC, local reputation, community attestations), making it distinct from siblings like ln_vendor_reputation.
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 explicit guidance on when to use this tool versus alternatives. The description does not mention when not to use it or suggest any sibling tools for specific scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_editA
Edit an existing memory's content or metadata.
Use this to correct wrong vendor information, update prices, or add context to an existing memory. Tracks edit history.
Args: id: The memory ID to edit. content: New content to replace the existing content. If omitted, content is unchanged. metadata: JSON string of metadata fields to merge into existing metadata. Example: '{"vendor": "bitrefill.com", "note": "price updated"}'
Returns: The updated memory record with old_content_preview for audit trail.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| content | No | ||
| metadata | No | {} |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses that it tracks edit history and returns old_content_preview for audit trail. It also explains parameter behavior (content unchanged if omitted, metadata merged). Without annotations, this is good but could mention permissions or reversibility.
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?
Description is concise, uses a clear structure with a usage statement and args breakdown. Every sentence adds value without redundancy.
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 3 parameters, no output schema, and 23 siblings, the description covers purpose, usage, parameters, and return behavior. It lacks error handling details but is adequate for a basic edit 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 has 0% description coverage, but the description adds full semantics for all three parameters: id (required), content (optional, replaces if provided), and metadata (JSON string, merges with example). This adds significant value beyond the schema types.
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?
Description clearly states 'Edit an existing memory's content or metadata' and provides specific use cases like correcting vendor info, updating prices, adding context. This distinguishes it from siblings such as memory_store (create) or memory_list (list).
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 states when to use: to correct, update, or add context to existing memories. While it doesn't explicitly list alternatives, the context and examples imply it's for edits only, not for creation (memory_store) or retrieval (memory_query).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_exportA
Export memories as Nostr NIP-78 events.
Converts local memories into portable Nostr event format. Events are signed if secp256k1 is available. Useful for backup, sharing, or manual relay publishing.
Args: limit: Maximum number of memories to export (default 100).
Returns: List of NIP-78 events with memory content.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, description must carry burden. It adds that events are signed conditionally and that limit controls number of memories. However, it does not disclose whether the tool modifies state, error conditions, or permissions required. This is adequate but not comprehensive.
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?
Description is concise (about 60 words), well-structured with purpose first, then explanation, use cases, and formal Args/Returns. No unnecessary words.
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 simplicity (1 param, no output schema, no annotations), description covers what the tool does, how it works, and its return value. Could mention it does not modify memories, but largely complete for its purpose.
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 coverage is 0%, but description explicitly defines 'limit: Maximum number of memories to export (default 100)', adding meaning beyond the schema's default and type alone. Compensates well for the single parameter.
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?
Description clearly states 'Export memories as Nostr NIP-78 events', a specific verb and resource. It distinguishes from sibling tools like memory_list or memory_sync by focusing on export/backup functionality.
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?
Description says 'Useful for backup, sharing, or manual relay publishing', providing clear use cases. It does not explicitly say when not to use or mention alternatives, but the context is sufficient for an agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_listA
List memories, optionally filtered by type and time range.
Use this to browse recent memories, check all transactions, or review memories of a specific type.
Args: type: Filter by memory type (transaction, vendor, preference, error, decision, general). since: Time filter. Relative: "1h", "24h", "7d", "30d". Or Unix timestamp. limit: Maximum number of results (default 50, max 200).
Returns: List of memories in reverse chronological order with stats.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | ||
| since | No | ||
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description is the main source. It implies a read-only operation (list) and mentions return format, but does not explicitly state safety, authentication needs, or side effects. Adequate but not thorough.
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 well-structured with a summary, usage guidance, args, and returns. Every sentence adds value, and it is concise without unnecessary 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?
With no output schema, the description includes return format. All parameters are documented. It lacks error handling or pagination details, but for a list operation with filters, it is largely 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%, but the description adds complete parameter details: valid values for type, relative/Unix timestamp for since, and default/max for limit. This fully compensates for missing schema descriptions.
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 clearly states 'List memories', using a specific verb and resource. It distinguishes from sibling tools like memory_store, memory_edit, memory_export, etc., which have different actions.
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 concrete use cases: 'browse recent memories, check all transactions, or review memories of a specific type'. It does not explicitly mention when not to use, but the contexts are clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_queryA
Search memories by relevance. Returns the most relevant matches.
Use this to recall past transactions, check vendor reputation, retrieve spending patterns, or find any previously stored information.
Args: query: Natural language search query. Examples: - "bitrefill payment history" - "which APIs gave rate limit errors?" - "spending decisions this week" limit: Maximum number of results (default 10, max 100). type: Optional filter by memory type (transaction, vendor, preference, error, decision, general).
Returns: List of matching memories ranked by relevance, with scores.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| limit | No | ||
| type | No |
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. It states the tool returns matches ranked by relevance with scores, implying a read-only operation. It could be more explicit about no side effects, but it is adequately transparent.
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 concise and well-structured: a one-sentence summary, a bullet list of use cases, and a clear args section. Every sentence adds value, and the purpose is front-loaded.
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?
Despite lacking an output schema, the description states the return format (list of memories ranked by relevance with scores). Combined with thorough parameter explanations, it is complete for a search tool with no missing context.
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%, but the description compensates excellently: it explains the 'query' with natural language examples, 'limit' with default and maximum, and 'type' with a list of possible values (e.g., transaction, vendor, preference). This adds significant meaning 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 clearly states it searches memories by relevance and returns most relevant matches. It distinguishes itself from siblings like memory_list (which likely lists all) and memory_edit/store/sync, providing a specific verb and resource.
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 gives explicit use cases such as recalling past transactions, checking vendor reputation, and retrieving spending patterns. While it does not explicitly state when not to use it, the use cases are clear and sufficient for an AI agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_storeA
Store a memory for later retrieval.
Use this to remember transactions, vendor experiences, decisions, spending patterns, API responses, or any information worth recalling.
Args: content: The memory content to store. Be descriptive. Examples: - "Paid 500 sats to bitrefill.com for a $5 Amazon gift card via L402. Fast, reliable." - "OpenAI API returned 429 rate limit after 50 requests/min. Backoff to 30/min." - "User prefers to cap spending at 10,000 sats per session." type: Memory category. One of: - general: Default, uncategorized - transaction: Payment records, invoices, L402 purchases - vendor: Service/API reputation and reliability notes - preference: User or agent preferences and settings - error: Error patterns and failure modes - decision: Key decisions and their reasoning metadata: JSON string of additional key-value pairs. Example: '{"vendor": "bitrefill.com", "amount_sats": 500}'
Returns: The stored memory record with id, content, type, and timestamps.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| type | No | general | |
| metadata | No | {} |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description lacks details on destructive behavior, idempotency, or authentication needs. It only states it stores and returns a record, which is minimal but not misleading.
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?
Well-structured with Args and Returns sections, front-loaded purpose. Examples add clarity but could be slightly more concise.
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 many memory-related sibling tools, description sufficiently covers purpose and parameters. Return value is specified, though no output schema exists.
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?
Input schema has 0% description coverage. Description provides detailed explanations for content, type categories, and metadata with examples, far exceeding schema info.
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 clearly states it stores a memory for later retrieval, with specific examples. It distinguishes from sibling tools like memory_list, memory_query, memory_edit.
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?
Provides explicit use cases (transactions, vendor experiences, decisions, etc.) but does not mention when not to use it or alternatives. Sibling tool names hint at alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_syncA
Sync memories with Nostr relays.
Push local memories to relays and/or pull remote memories to local. When gateway_discovery is enabled, also syncs gateway announcements. Requires secp256k1 for push (signing). Pull works with any identity.
Args: direction: Sync direction. One of: - "push": Upload local memories to relays - "pull": Download memories from relays - "both": Push then pull (default)
Returns: Sync result with counts of pushed/pulled memories and any errors.
| Name | Required | Description | Default |
|---|---|---|---|
| direction | No | both |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses behaviors: push vs pull vs both, gateway discovery sync, prerequisites, and return format (counts and errors). No contradictions.
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?
Concise, well-structured with Args and Returns sections. Every sentence adds value; no redundancy. Front-loaded with 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?
Covers purpose, usage, parameters, return values, and prerequisites. Minor gap: gateway_discovery enabling not explained. Otherwise complete for a simple sync tool with no 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 has 0% description coverage, but description fully explains the `direction` parameter including all options, default value, and explicit mapping (push, pull, both). Adds complete meaning beyond 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?
Clearly states 'Sync memories with Nostr relays' and distinguishes from sibling tools (e.g., memory_edit, memory_query) by specifying the network sync aspect. No other sibling tool covers syncing with relays.
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?
Provides clear context: direction options, prerequisites (secp256k1 for push), and behavior. Could be improved by explicitly stating when not to use, but no competing sibling tool exists.
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. Dates show when Glama detected each change.
22 tool updates
v0.7.0- First observed
ln_agent_attest - First observed
ln_agent_verify - First observed
ln_anomaly_check - First observed
ln_auth_lookup - First observed
ln_auth_session - First observed
ln_budget_check - First observed
ln_budget_set - First observed
ln_budget_status - First observed
ln_compliance_report - First observed
ln_discover_gateways - First observed
ln_preflight - First observed
ln_remote_query - First observed
ln_spending_summary - First observed
ln_trust_attest - First observed
ln_vendor_reputation - First observed
ln_vendor_trust - First observed
memory_edit - First observed
memory_export - First observed
memory_list - First observed
memory_query - First observed
memory_store - First observed
memory_sync
TDQS
Most tools have distinct purposes. There is some overlap like ln_vendor_reputation vs ln_vendor_trust, but descriptions clarify differences. The ln_preflight tool bundles multiple checks but is clearly described as a composite.
All tools follow a consistent pattern: 'ln_' prefix for Lightning-related and 'memory_' for memory operations. Verbs are consistent and all snake_case.
22 tools is on the higher side for a single server. While each tool has a clear role, some could potentially be combined (e.g., multiple budget tools). The count feels slightly bloated for the domain.
The tool surface covers memory CRUD, budget, compliance, vendor reputation, and remote queries. Minor gaps exist: no memory delete, no revoke attestation, but overall coverage is solid.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent registry with Nostr identity, reputation, escrow, observability, and Lightning payments.
Verified memory for AI agents. Signed assertions, billing attestation, session continuity.
MCP-native Trust Infrastructure for AI Agents. Persistent encrypted memory with Trust Quotient.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to perform Bitcoin and Lightning Network payments using a non-custodial, zero-trust architecture. It provides 13 tools for wallet management, invoice creation, and payment processing while keeping node credentials local to the user's machine.1317MIT
- AlicenseNot gradedqualityCmaintenancePay-per-use semantic memory for AI agents with cryptographic attestation. Vector embeddings with SHA256 commitment, secp256k1 signature, and Lightning invoice.Apache 2.0
- AlicenseAqualityCmaintenanceMCP server exposing a Lightning wallet to LLM agents over Nostr Wallet Connect (NIP-47): balance, invoices, LN address/LNURL payments, batch pay, and keysend. All spend tools are wrapped in a defense-in-depth safety stack — budget caps, allowlist, two-step confirmation, audit log.1361MIT
- AlicenseNot gradedqualityAmaintenanceLocal-first, encrypted memory for AI agents, with cryptographic forgetting.3Apache 2.0
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/singularityjason/lightning-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server