Diogenes Agent Core Essentials MCP

v1.0.0
io.github.stand-out-of-my-sun/diogenes-agent-core-mcp Checked 3 days ago Published 8 days ago

Curated 10-tool high-utility MCP pack: markdown, JSON repair, SQL AST, PII, and context pruning.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

verify_agent_command_safety Autonomous Agent Pre-Execution Command & Prompt Injection Gate

Evaluates untrusted agent prompts, bash commands, and tool arguments to block prompt injection, destructive shell commands, and private-key exfiltration. Use when screening a general shell command or user prompt before autonomous agent execution; for statically validating SQL database queries at the AST level, use validate_sql_query_ast instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'payload' ('action_type' defaults to 'bash_command'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
payload *stringRaw command string, script snippet, or untrusted prompt to inspect for safety violations.
action_typestringExecution context of the payload; defaults to 'bash_command' when omitted.

validate_sql_query_ast AST-Level Read-Only SQL Query & Injection Safety Validator

Performs static AST syntax tree parsing on SQL statements to verify strictly read-only SELECT clauses and reject mutations, stacked queries, or comment bypasses. Use when verifying that an agent-authored SQL statement is strictly read-only before running it on a database; for screening non-SQL bash commands or general agent prompts, use verify_agent_command_safety instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'sql_statement' ('dialect' defaults to 'postgres'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
sql_statement *stringSQL statement string to statically parse and audit for read-only SELECT compliance (e.g. 'SELECT id, email FROM users WHERE active = 1').
dialectstringSQL dialect ruleset used for AST token inspection; defaults to 'postgres' when omitted.

redact_sensitive_pii Zero-PII & Secret Credential Redaction Engine

Redacts emails, phone numbers, SSNs, credit cards, API keys, and crypto private keys from text before logging or external transmission. Use when stripping personal data or secret credentials from prompts, logs, or outbound messages; for neutralizing indirect prompt injections and invisible Unicode in inbound tool responses, use sanitize_tool_output_stream instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'text' ('redaction_style' defaults to 'typed_token'), supports '?demo=true' or L402 (25 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
text *stringInput text containing potential PII or secret keys to redact.
redaction_stylestringPlaceholder format used for redacted spans; defaults to 'typed_token' when omitted.

heal_malformed_json Deterministic Malformed JSON Syntax & Truncation Healer

Deterministic JSON syntax repair: normalizes quotes, unclosed brackets, and boolean literals into compliant RFC 8259 JSON structure without data deletion. Use when fixing syntax-broken JSON strings that fail JSON.parse(); for coercing field types and verifying properties on already-parseable JSON objects against a target JSON Schema, use enforce_json_schema_types instead. Read-only edge call (32 KB, 60 RPM): accepts 'malformed_json' (with enum defaults), uses '?demo=true' or L402 (15 sats); HTTP 400 if invalid.

ParameterTypeDescription
malformed_json *stringRaw broken, truncated, or markdown-wrapped JSON string to repair.
repair_modestringBracket-closing and literal-normalization strategy; defaults to 'heuristic_fast' when omitted.

synthesize_safe_regex Linear-Time O(n) ReDoS-Safe Regular Expression Synthesizer & Tester

Synthesizes linear-time O(n) regular expressions free of catastrophic backtracking (ReDoS) and validates them against positive and negative test strings. Use when generating and verifying a regular expression pattern for input validation or lexical parsing; for repairing broken JSON syntax directly without writing custom regexes, use heal_malformed_json instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'description' ('flavor' defaults to 'ecmascript_js'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
description *stringNatural-language specification of the text pattern to match (e.g. 'RFC 5322 email addresses excluding plus-aliases').
flavorstringTarget regular expression engine syntax; defaults to 'ecmascript_js' when omitted.

prune_context_skeleton AST-Aware Context Window & Source Code Skeleton Pruner

Compresses large source files, logs, or transcripts by 50–80% to fit an LLM context budget while preserving 100% of function/class/type signatures, imports, error frames, and query-matched lines. Use when shrinking oversized source files or logs before feeding them into an LLM prompt; for counting BPE tokens across prompt segments and calculating multi-model inference costs without altering text, use plan_context_token_budget instead. Read-only edge call (32 KB, 60 RPM): accepts 'content' (with enum defaults), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.

ParameterTypeDescription
content *stringRaw source code, document, or multi-turn transcript to compress.
focus_querystringOptional symbol or keyword query whose matching lines receive maximum retention priority.
pruning_modestringSalience weighting preset; defaults to 'ast_signatures_first' when omitted.
target_rationumberTarget token retention ratio between 0.15 and 0.85; defaults to 0.45 when omitted.

plan_context_token_budget BPE Token Budget, Attention Trough & Multi-Model Cost Planner

Counts subword BPE tokens across prompt segments, detects high-priority instructions trapped in the 35%–72% Lost-in-the-Middle attention trough, and calculates USD/satoshi costs across frontier LLMs. Use when auditing prompt token budgets, reordering prompt sections for primacy/recency attention, or comparing model API costs; for actively compressing and stripping low-salience lines from a single large file, use prune_context_skeleton instead. Read-only edge call (32 KB, 60 RPM): accepts 'segments_json' (with enum defaults), uses '?demo=true' or L402 (10 sats); HTTP 400 if invalid.

ParameterTypeDescription
segments_json *stringJSON string or array of prompt segments '[{"name":"sys","text":"...","priority":10}]' to analyze.
max_context_tokensnumberTarget model context window limit in tokens; defaults to 128000 when omitted.
target_model_familystringPrimary model family for token-Window calibration; defaults to 'gemini_3_1' when omitted.

estimate_bitcoin_mempool_fees Bitcoin Mainnet Mempool Feerate Estimator (sat/vB)

Fetches real-time Bitcoin mainnet mempool feerate recommendations in satoshis per virtual byte (sat/vB) across fastest, half-hour, hour, and economy confirmation tiers. Use when checking current Bitcoin L1 network congestion before broadcasting an on-chain BTC transaction; for calculating exact SegWit/Taproot UTXO batch consolidation vByte weights and dust thresholds, use plan_bitcoin_utxo_consolidation instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'confirmation_target', supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
confirmation_targetstringTarget confirmation speed tier; defaults to 'half_hour' when omitted.

extract_clean_markdown Web HTML to Clean LLM-Optimized Markdown Engine

Converts raw HTML pages or live web URLs into clean, boilerplate-free, LLM-optimized Markdown with preserved hyperlinks and headings. Accepts either 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article; for isolating tabular data into structured datasets, use parse_html_tables instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'url' or 'html_content' ('conversion_mode' defaults to 'clean_semantic_article'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
conversion_modestringMarkdown extraction strategy: clean semantic article, preserve tables/code, or minimal text.
html_contentstringRaw HTML string of the web page or document to convert to clean Markdown.
preserve_linksbooleanWhether to retain anchor hyperlinks and image markdown references in output.
urlstringOptional web page URL to fetch and parse directly, bypassing an out-of-band fetch step.

expand_search_queries High-Entropy Boolean & Semantic Search Query Expander

Generates targeted Boolean queries, semantic synonym variations, and sub-question expansions from an ambiguous prompt. Use when overcoming query vocabulary mismatches and expanding search recall across academic, code, or patent databases; for scoping queries to domain categories, use filter_domain_intelligence instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'base_query' ('expansion_strategy' defaults to 'boolean_operators'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

ParameterTypeDescription
base_query *stringInitial search prompt or ambiguous question requiring semantic query expansion.
expansion_strategystringQuery expansion method: Boolean operators, semantic synonyms, or cross-domain questions.
target_countintegerTarget count of query variations to synthesize.