search_server_logs
[MAINTENANCE] 222d54f8 — BM25 full-text search over the server_logs ring-buffer. Complements get_server_logs (which filters by level/module/since) with keyword-ranked retrieval — useful when you know WHAT went wrong but not exactly WHEN (e.g. search 'OAuth token refresh' or 'psycopg connection po...
This record as markdown: /tools/io-github-ajc3xc-meridian/search-server-logs.md
What search_server_logs does on Meridian
AI agents call search_server_logs to retrieve information from Meridian without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
level | string | — | Filter hits to a specific log level (post-BM25 filter). Omit to return all levels. |
limit | integer | — | Max ranked hits to return (default 20). |
query | string | Yes | BM25 search terms — keywords across log level, logger name, message text, and traceback (e.g. 'OAuth refresh', 'connection pool timeout', 'psycopg'). |
since | string | — | ISO timestamp (UTC). Only return hits at or after this time (post-BM25 filter). Example: '2026-07-15 03:00:00' |
Parameters from the server's own tool schema.
Why search_server_logs is rated Low
This tool retrieves and queries log data using full-text search with no side effects. It searches existing logs without creating, modifying, deleting, or executing operations. The description explicitly frames it as a retrieval mechanism ("search", "retrieval", "filters") complementary to a read-only log getter. No code execution, data modification, or destructive actions are present.
From the tool's definition BM25 full-text search over the server_logs ring-buffer; keyword-ranked retrieval; no modification or deletion described; complements get_server_logs which filters by level/module/since
Attacks that exploit this kind of access
The rule that runs search_server_logs safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Meridian, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For search_server_logs, this is the rule to start with:
search_server_logs is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Meridian, apply this rule, and every search_server_logs call is checked against it from then on.
Questions about search_server_logs
[MAINTENANCE] 222d54f8 — BM25 full-text search over the server_logs ring-buffer. Complements get_server_logs (which filters by level/module/since) with keyword-ranked retrieval — useful when you know WHAT went wrong but not exactly WHEN (e.g. search 'OAuth token refresh' or 'psycopg connection pool' across the last 2000 log records). Uses DuckDB native FTS (Okapi BM25) with Porter stemming over a concatenated body of level + logger + message + exc_text. Incremental: re-syncs only new/evicted rows on each call; repeat queries over an unchanged log window are near-free. Ring-buffer eviction is handled consistently — rows pruned from server_logs are removed from the FTS index on the next call. Returns {query, total_in_index, count, hits:[{id, level, logger, message, exc_text, recorded_at, score, bm25}]}. Empty/no-match query returns {hits:[]}. It is categorised as a Read tool in the Meridian MCP Server, which means it retrieves data without modifying state.
search_server_logs accepts 4 parameters: level, limit, query, since. Required: query. The full parameter table on this page comes from the server's own tool schema.
Register the Meridian MCP server in PolicyLayer and add a rule for search_server_logs: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Meridian. Nothing to install.
search_server_logs is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the search_server_logs rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for search_server_logs. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
search_server_logs is provided by the Meridian MCP server (@meridianmcp/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Meridian, and thousands of servers like it.
This server
Across the catalogue