{
  "$schema": "https://smithery.ai/docs/config#server-card",
  "serverInfo": {
    "name": "Diogenes Autonomous Agent Core Essentials MCP",
    "version": "1.3.0",
    "description": "Ultra-lean 10-tool core essentials MCP package for autonomous agents & IDEs (Cursor, Claude Desktop, Windsurf, Zed): markdown extraction, SQL AST safety gate, JSON healing, context pruning, mempool fees, safe regex, PII scrubbing, command safety, query expansion, and token planning. 100% Free Developer Tier with zero keys or wallet required.",
    "homepage": "https://diogenesgateway.com",
    "repository": "https://github.com/stand-out-of-my-sun/diogenes-agent-core-mcp"
  },
  "authentication": {
    "required": false,
    "schemes": []
  },
  "connection": {
    "type": "http",
    "url": "https://diogenesgateway.com/mcp/agent-core"
  },
  "tools": [
    {
      "name": "verify_agent_command_safety",
      "title": "Autonomous Agent Pre-Execution Command & Prompt Injection Gate",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "payload": {
            "type": "string",
            "description": "Raw command string, script snippet, or untrusted prompt to inspect for safety violations."
          },
          "action_type": {
            "type": "string",
            "description": "Execution context of the payload; defaults to 'bash_command' when omitted.",
            "enum": [
              "bash_command",
              "tool_call",
              "user_prompt",
              "webhook_payload"
            ]
          }
        },
        "required": [
          "payload"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for verify_agent_command_safety.",
        "properties": {
          "safe": {
            "type": "boolean",
            "description": "True when zero injection, exfiltration, or destructive patterns are found."
          },
          "risk_score": {
            "type": "number",
            "description": "Normalized threat probability from 0.0 (benign) to 1.0 (critical)."
          },
          "verdict": {
            "type": "string",
            "description": "Enforcement decision ('ALLOW', 'BLOCK', or 'QUARANTINE')."
          },
          "threats_detected": {
            "type": "array",
            "description": "List of specific threat categories triggered by the payload."
          }
        },
        "required": [
          "safe",
          "risk_score",
          "verdict",
          "threats_detected"
        ]
      },
      "annotations": {
        "title": "Autonomous Agent Pre-Execution Command & Prompt Injection Gate",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "validate_sql_query_ast",
      "title": "AST-Level Read-Only SQL Query & Injection Safety Validator",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sql_statement": {
            "type": "string",
            "description": "SQL statement string to statically parse and audit for read-only SELECT compliance (e.g. 'SELECT id, email FROM users WHERE active = 1')."
          },
          "dialect": {
            "type": "string",
            "description": "SQL dialect ruleset used for AST token inspection; defaults to 'postgres' when omitted.",
            "enum": [
              "postgres",
              "mysql",
              "sqlite",
              "snowflake"
            ]
          }
        },
        "required": [
          "sql_statement"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for validate_sql_query_ast.",
        "properties": {
          "safe_read_only": {
            "type": "boolean",
            "description": "True when the query is a pure SELECT statement with zero injection clauses."
          },
          "blocked_clauses": {
            "type": "array",
            "description": "List of destructive or injection SQL tokens detected."
          },
          "tables_accessed": {
            "type": "array",
            "description": "Table identifiers referenced in FROM and JOIN clauses."
          },
          "verdict": {
            "type": "string",
            "description": "Execution decision ('ALLOW_EXECUTION' or 'BLOCK_EXECUTION')."
          }
        },
        "required": [
          "safe_read_only",
          "blocked_clauses",
          "tables_accessed",
          "verdict"
        ]
      },
      "annotations": {
        "title": "AST-Level Read-Only SQL Query & Injection Safety Validator",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "redact_sensitive_pii",
      "title": "Zero-PII & Secret Credential Redaction Engine",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Input text containing potential PII or secret keys to redact."
          },
          "redaction_style": {
            "type": "string",
            "description": "Placeholder format used for redacted spans; defaults to 'typed_token' when omitted.",
            "enum": [
              "typed_token",
              "asterisk_mask",
              "sha256_pseudonym"
            ]
          }
        },
        "required": [
          "text"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for redact_sensitive_pii.",
        "properties": {
          "scrubbed_text": {
            "type": "string",
            "description": "Sanitized text with all sensitive entities replaced by redaction tokens."
          },
          "redactions_count": {
            "type": "integer",
            "description": "Total number of sensitive entities redacted."
          },
          "categories_redacted": {
            "type": "array",
            "description": "Types of sensitive data detected (e.g. 'EMAIL', 'SSN', 'PRIVATE_KEY')."
          },
          "zero_pii_certified": {
            "type": "boolean",
            "description": "True when post-scan verification confirms zero residual PII patterns."
          }
        },
        "required": [
          "scrubbed_text",
          "redactions_count",
          "categories_redacted",
          "zero_pii_certified"
        ]
      },
      "annotations": {
        "title": "Zero-PII & Secret Credential Redaction Engine",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "heal_malformed_json",
      "title": "Deterministic Malformed JSON Syntax & Truncation Healer",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "malformed_json": {
            "type": "string",
            "description": "Raw broken, truncated, or markdown-wrapped JSON string to repair."
          },
          "repair_mode": {
            "type": "string",
            "description": "Bracket-closing and literal-normalization strategy; defaults to 'heuristic_fast' when omitted.",
            "enum": [
              "heuristic_fast",
              "strict_rfc8259",
              "close_truncated_stream"
            ]
          }
        },
        "required": [
          "malformed_json"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for heal_malformed_json.",
        "properties": {
          "status": {
            "type": "string",
            "description": "Repair outcome ('repaired' or 'valid_as_is')."
          },
          "repaired_json": {
            "type": "string",
            "description": "Valid RFC 8259 JSON string after syntax healing."
          },
          "parsed_object": {
            "type": "object",
            "description": "Deserialized JSON object produced from the repaired string."
          },
          "fixes_applied": {
            "type": "array",
            "description": "List of lexical repairs performed."
          }
        },
        "required": [
          "status",
          "repaired_json",
          "parsed_object",
          "fixes_applied"
        ]
      },
      "annotations": {
        "title": "Deterministic Malformed JSON Syntax & Truncation Healer",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "synthesize_safe_regex",
      "title": "Linear-Time O(n) ReDoS-Safe Regular Expression Synthesizer & Tester",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Natural-language specification of the text pattern to match (e.g. 'RFC 5322 email addresses excluding plus-aliases')."
          },
          "flavor": {
            "type": "string",
            "description": "Target regular expression engine syntax; defaults to 'ecmascript_js' when omitted.",
            "enum": [
              "ecmascript_js",
              "python_re",
              "rust_regex_dfa",
              "pcre2"
            ]
          }
        },
        "required": [
          "description"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for synthesize_safe_regex.",
        "properties": {
          "pattern": {
            "type": "string",
            "description": "Synthesized regular expression pattern string (without slash delimiters)."
          },
          "redos_safe": {
            "type": "boolean",
            "description": "True when static star-height analysis confirms zero exponential backtracking."
          },
          "time_complexity": {
            "type": "string",
            "description": "Worst-case matching complexity ('O(n)')."
          },
          "test_results": {
            "type": "array",
            "description": "Pass/fail verification results across positive and negative test cases."
          }
        },
        "required": [
          "pattern",
          "redos_safe",
          "time_complexity",
          "test_results"
        ]
      },
      "annotations": {
        "title": "Linear-Time O(n) ReDoS-Safe Regular Expression Synthesizer & Tester",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "prune_context_skeleton",
      "title": "AST-Aware Context Window & Source Code Skeleton Pruner",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Raw source code, document, or multi-turn transcript to compress."
          },
          "target_ratio": {
            "type": "number",
            "description": "Target token retention ratio between 0.15 and 0.85; defaults to 0.45 when omitted."
          },
          "focus_query": {
            "type": "string",
            "description": "Optional symbol or keyword query whose matching lines receive maximum retention priority."
          },
          "pruning_mode": {
            "type": "string",
            "description": "Salience weighting preset; defaults to 'ast_signatures_first' when omitted.",
            "enum": [
              "ast_signatures_first",
              "errors_and_stackframes",
              "prose_headings_first"
            ]
          }
        },
        "required": [
          "content"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for prune_context_skeleton.",
        "properties": {
          "original_tokens_est": {
            "type": "integer",
            "description": "Estimated BPE token count of the unpruned input."
          },
          "compressed_tokens_est": {
            "type": "integer",
            "description": "Estimated BPE token count after structural pruning."
          },
          "tokens_saved": {
            "type": "integer",
            "description": "Net BPE tokens eliminated."
          },
          "preserved_symbols": {
            "type": "array",
            "description": "Function, class, interface, and struct identifiers retained."
          },
          "compressed_content": {
            "type": "string",
            "description": "Pruned text with elision markers where low-salience lines were removed."
          }
        },
        "required": [
          "original_tokens_est",
          "compressed_tokens_est",
          "tokens_saved",
          "preserved_symbols",
          "compressed_content"
        ]
      },
      "annotations": {
        "title": "AST-Aware Context Window & Source Code Skeleton Pruner",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "plan_context_token_budget",
      "title": "BPE Token Budget, Attention Trough & Multi-Model Cost Planner",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "segments_json": {
            "type": "string",
            "description": "JSON string or array of prompt segments '[{\"name\":\"sys\",\"text\":\"...\",\"priority\":10}]' to analyze."
          },
          "max_context_tokens": {
            "type": "number",
            "description": "Target model context window limit in tokens; defaults to 128000 when omitted."
          },
          "target_model_family": {
            "type": "string",
            "description": "Primary model family for token-Window calibration; defaults to 'gemini_3_1' when omitted.",
            "enum": [
              "gemini_3_1",
              "claude_4_5",
              "gpt_5",
              "deepseek_r1"
            ]
          }
        },
        "required": [
          "segments_json"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for plan_context_token_budget.",
        "properties": {
          "total_input_tokens_est": {
            "type": "integer",
            "description": "Total BPE tokens summed across all prompt segments."
          },
          "within_budget": {
            "type": "boolean",
            "description": "True when total_input_tokens_est fits inside available_input_budget."
          },
          "lost_in_the_middle_warnings": {
            "type": "array",
            "description": "Warnings for high-priority segments positioned in the 35%–72% attention trough."
          },
          "optimal_primacy_recency_order": {
            "type": "array",
            "description": "Recommended segment ordering placing critical instructions at prompt boundaries."
          },
          "multi_model_cost_comparison": {
            "type": "array",
            "description": "Estimated USD and satoshi inference cost across 5 frontier models."
          }
        },
        "required": [
          "total_input_tokens_est",
          "within_budget",
          "lost_in_the_middle_warnings",
          "optimal_primacy_recency_order",
          "multi_model_cost_comparison"
        ]
      },
      "annotations": {
        "title": "BPE Token Budget, Attention Trough & Multi-Model Cost Planner",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "estimate_bitcoin_mempool_fees",
      "title": "Bitcoin Mainnet Mempool Feerate Estimator (sat/vB)",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "confirmation_target": {
            "type": "string",
            "description": "Target confirmation speed tier; defaults to 'half_hour' when omitted.",
            "enum": [
              "fastest_block",
              "half_hour",
              "one_hour",
              "economy"
            ]
          }
        },
        "required": []
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic response schema for estimate_bitcoin_mempool_fees.",
        "properties": {
          "fastestFee": {
            "type": "integer",
            "description": "Recommended feerate in sat/vB for next-block (~10 min) inclusion."
          },
          "halfHourFee": {
            "type": "integer",
            "description": "Recommended feerate in sat/vB for ~30-minute confirmation."
          },
          "hourFee": {
            "type": "integer",
            "description": "Recommended feerate in sat/vB for ~60-minute confirmation."
          },
          "economyFee": {
            "type": "integer",
            "description": "Low-priority feerate in sat/vB for non-urgent batch sweeps."
          }
        },
        "required": [
          "fastestFee",
          "halfHourFee",
          "hourFee",
          "economyFee"
        ]
      },
      "annotations": {
        "title": "Bitcoin Mainnet Mempool Feerate Estimator (sat/vB)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "extract_clean_markdown",
      "title": "Web HTML to Clean LLM-Optimized Markdown Engine",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Optional web page URL to fetch and parse directly, bypassing an out-of-band fetch step."
          },
          "html_content": {
            "type": "string",
            "description": "Raw HTML string of the web page or document to convert to clean Markdown."
          },
          "conversion_mode": {
            "type": "string",
            "description": "Markdown extraction strategy: clean semantic article, preserve tables/code, or minimal text.",
            "enum": [
              "clean_semantic_article",
              "preserve_tables_and_code",
              "minimal_text_only"
            ]
          },
          "preserve_links": {
            "type": "boolean",
            "description": "Whether to retain anchor hyperlinks and image markdown references in output."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic execution response schema for extract_clean_markdown.",
        "properties": {
          "markdown": {
            "type": "string",
            "description": "Clean, sanitized LLM-ready markdown document."
          },
          "title": {
            "type": "string",
            "description": "Document title extracted from H1 or title tag."
          },
          "word_count": {
            "type": "integer",
            "description": "Net word count of extracted readable prose."
          },
          "links_extracted_count": {
            "type": "integer",
            "description": "Total hyperlinks preserved in document."
          }
        },
        "required": [
          "markdown",
          "title",
          "word_count",
          "links_extracted_count"
        ]
      },
      "annotations": {
        "title": "Web HTML to Clean LLM-Optimized Markdown Engine",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "expand_search_queries",
      "title": "High-Entropy Boolean & Semantic Search Query Expander",
      "description": "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.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "base_query": {
            "type": "string",
            "description": "Initial search prompt or ambiguous question requiring semantic query expansion."
          },
          "expansion_strategy": {
            "type": "string",
            "description": "Query expansion method: Boolean operators, semantic synonyms, or cross-domain questions.",
            "enum": [
              "boolean_operators",
              "semantic_synonyms",
              "cross_domain_questions"
            ]
          },
          "target_count": {
            "type": "integer",
            "description": "Target count of query variations to synthesize."
          }
        },
        "required": [
          "base_query"
        ]
      },
      "outputSchema": {
        "type": "object",
        "description": "Deterministic execution response schema for expand_search_queries.",
        "properties": {
          "original_query": {
            "type": "string",
            "description": "Original user input query before expansion."
          },
          "expanded_queries": {
            "type": "array",
            "description": "Array of synthesized search strings optimized for search engine indexing."
          },
          "intent_classification": {
            "type": "string",
            "description": "Identified query intent (e.g., informational, transactional, technical_navigational)."
          }
        },
        "required": [
          "original_query",
          "expanded_queries",
          "intent_classification"
        ]
      },
      "annotations": {
        "title": "High-Entropy Boolean & Semantic Search Query Expander",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    }
  ],
  "resources": [],
  "prompts": []
}