queryApi
Query the Mallory cybersecurity-intelligence API. Two input fields:
"path": an endpoint under /v1/ (e.g. "/v1/vulnerabilities", "/v1/actors/APT29/attack_patterns"). You can ALSO paste a Mallory web URL or path here (e.g. "https://app.mallory.ai/vulnerabilities/CVE-2025-43300", "/actors/{uuid}", "/attack-patterns/T1566", "/references/{uuid}") — it's auto-translated to the matching API endpoint, so you never need to know the URL→API mapping.
"queryParams": object of string key->value pairs for filtering, sorting, pagination
PREFER the named per-entity tools when they fit: get to fetch one by id (e.g. getVulnerability, getThreatActor, getMalware, getObservable) and list to filter many (e.g. listVulnerabilities, listThreatActors). Use THIS tool as the fallback for what they don't express: relationship pivots (e.g. /v1/actors/APT29/malware), cross-entity search (/v1/search), structured field filters and numeric/date ranges, or any endpoint they don't cover. You can also paste a Mallory web URL as the path.
DATA DOMAINS (first path segment): vulnerabilities, actors (threat actors), malware, exploits, exploitations, breaches, attack_patterns (MITRE ATT&CK), products, organizations, observables, references, stories, advisories, detections, weaknesses (CWE), industries, packages, opinions, mentions, search.
COMMON PATTERNS: List + filter: path="/v1/vulnerabilities" queryParams={"filter":"cve:CVE-2024","sort":"cvss_base_score","order":"desc","limit":"10"} Relationships: path="/v1/actors/APT29/malware" | path="/v1/vulnerabilities/CVE-2024-1234/threat_actors" Cross-entity: path="/v1/search" queryParams={"q":"ransomware","types":"threat_actor,malware","limit":"10"} Compromised pkgs: path="/v1/packages" queryParams={"sort":"last_compromised_at","order":"desc","limit":"20"} — recently compromised packages, newest first (use sort=compromise_evidence_count for most-compromised by count). Drill in via path="/v1/packages/{uuid}/compromises" (sorts by reported_at desc; optional compromise_type: malicious_version, account_takeover, typosquat, dependency_confusion, backdoor, supply_chain, other).
FILTER PREFIXES (inside the "filter" param; which apply depends on the endpoint): cve:, uuid:, name:, desc:, gen_name:, gen_description:, mitre_id:, tactic:, loss_type:, record_type:. No prefix = default text/name search.
FIELD OPERATORS (append to a field name with "__"): strings: __neq, __in, __not_in, __like, __ilike (case-insensitive) numbers: __neq, __gt, __gte, __lt, __lte e.g. {"cvss_base_score__gte":"9"} timestamps: __gte, __lt with ISO-8601 values e.g. {"published_at__gte":"2024-01-01"}
CVSS Vector filtering (/v1/vulnerabilities)
CVSS vector filters: cvss=AV:A/PR:N matches all slash-separated tokens within one stored assessment; cvss__in=AV:A,AV:N matches any comma-separated fragment. Both search across CVSS 2.0, 3.0, 3.1, and 4.0 assessments; prefix a fragment with CVSS:3.1/ to restrict its version. Metric names and values are case-sensitive (v2 Au differs from v4 AU), and only explicitly stored metrics match. These filters do not change the selected numeric cvss_base_score. CVSS CEL: where='cvss == "AV:A/PR:N" && epss_score >= 0.5' supports ==, !=, in, AND/OR/NOT. Keep tokens in one fragment for same-assessment AND; separate CVSS comparisons may match different assessments. Invalid fragments return HTTP 400: correct the requested filter, never retry without it.
HUNTING: Actor/malware indicator_context summarizes global plus current-tenant intelligence for the resolved observable, not an actor-specific edge; tags/roles honor requested scope. Missing context and dates/roles remain unknown. source_count does not count independent investigations. Correct a rejected filter without dropping the user's selection. Array-typed queryParams accept CSV except /v1/observables tag, whose commas are literal; repeat inline tag parameters for multiple exact values. Repeated inline array parameters retain all values.
PAGINATION/SORT: "limit" (follow the endpoint's documented bound), "offset", "sort":"", "order":"asc"|"desc".
RESPONSE: results come back as {"data": , "meta": {"endpoint","path"}}. For list / search / relationship endpoints "data" is the list envelope {"data":[...items], "total", "offset", "limit"} (items live at data.data); for a single-entity path "data" is the entity object. List responses are returned whole, exactly as the API paged them — control size with limit/offset. Semantic entity queries return an exact integer total, but descending similarity pages without a cutoff are approximate; a 503 means semantic search is temporarily unavailable (a provider failure or a very broad query timing out), never that nothing matched. Invalid, blocked, or unknown paths return a tool error (isError), not a result.
Repository data availability: An empty resolved inventory, current=null, or an unavailable inventory tool does not mean the tenant has no repositories or vulnerabilities. Check connected integrations and whether they cover the requested data. If resolved inventory lacks that coverage and an authorized integration-data transport is available, continue with connected-source data: in the in-app sandbox, load the steampipe-querying skill, discover tables for the connected provider, and use its structured query workflow (cache first; live when uncached or current state is required). Preserve existing filters and repository scope, and report source freshness and coverage differences. If this client has no such transport or no relevant integration is connected, state the coverage limitation; never substitute global threat intel for tenant evidence. Do not bypass permission denials. Offer Mallory asset-page links only when that UI is enabled for the caller; otherwise use a source-provided repository URL when available.
Note: schedule management (/v1/schedules) is not exposed over MCP in V1. Every other endpoint is scoped by your API key to your own tenant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | An endpoint path under /v1/ (e.g. /v1/vulnerabilities, /v1/actors/APT29/attack_patterns), OR a Mallory web URL/path you can paste directly (e.g. https://app.mallory.ai/vulnerabilities/CVE-2025-43300, /actors/{uuid}, /attack-patterns/T1566, /references/{uuid}) — pasted links are auto-translated to the matching API endpoint. | |
| queryParams | No | Query parameters for filtering, sorting, and pagination. Pass as {"key":"value"} pairs, e.g. {"filter":"cve:CVE-2024","limit":"10","sort":"cvss_base_score"}. For array parameters, use comma-separated values here (e.g. {"types":"vulnerability,exploit"}), except /v1/observables tag: commas stay literal, and multiple tags require repeated inline tag keys. Explicit values replace all inline values for that key. Pass {} if no params needed. |