Skip to content

v0.3.0

Latest

Choose a tag to compare

@mr-karan mr-karan released this 13 May 06:51

Tracks logchef v1.6.0. Saved queries and alerts are no longer team-scoped on the server — their endpoints in this client are rewired and the team-scoped URLs are gone.

⚠️ Breaking for MCP tool users. Tool names, request shapes, and resource URIs changed. See the migration section below.


✨ Highlights

  • Saved-query tools rewired to logchef's flat /api/v1/saved-queries. The whole tool-set was renamed and re-shaped to match the new server contract.
  • Alerts moved to /api/v1/alerts. list_alerts now takes only an optional source_id; get_alert_history only needs alert_id.
  • Resource URIs simplified — no more team prefix for saved queries.
  • Dependencies refreshed (mark3labs/mcp-go v0.46.0 → v0.53.0, spf13/cast v1.9.2 → v1.10.0, google/jsonschema-go v0.4.2 → v0.4.3, Go toolchain → 1.25.5).
  • Plus the previously-unreleased typed-tool-registration, structured outputs, tool annotations, investigation prompts, analysis/discovery/telemetry tools, and several fixes that had been sitting in the Unreleased bucket.

💥 Breaking changes

Tool renames

Before After
get_collections list_saved_queries
get_collection get_saved_query
create_collection create_saved_query
update_collection update_saved_query
delete_collection delete_saved_query

Saved-query request shape

The query field is gone. Saved queries now carry:

  • source_id (set at create time only — update can't retarget)
  • query_type"logchefql" or "sql"
  • query_content — JSON envelope with version, sourceId, timeRange, limit, and the query text

Alert tools lose team scoping

Tool Before After
list_alerts required team_id + source_id optional source_id filter
get_alert_history required team_id + source_id + alert_id only alert_id
investigate_alert prompt required team_id + source_id + alert_id only alert_id; team/source optional hints

Resource URI templates

Before After
logchef://team/{team_id}/source/{source_id}/collections logchef://source/{source_id}/saved-queries
logchef://team/{team_id}/source/{source_id}/collection/{collection_id} logchef://saved-query/{query_id}

The source-schema template (logchef://team/{team_id}/source/{source_id}/schema) is unchanged.


What's new (previously unreleased)

  • Typed tool registration — All tools use mcp-go's native WithInputSchema[T] / WithOutputSchema[T] with NewTypedToolHandler and NewStructuredToolHandler. The custom reflection-based wrapper is gone.
  • Structured output schemas on tools with fixed shapes (profile, teams, sources, saved queries, admin CRUD).
  • Tool annotations — every tool has ReadOnlyHintAnnotation, DestructiveHintAnnotation, and TitleAnnotation.
  • Investigation promptsinvestigate_error_spike and investigate_alert.
  • Analysis toolscompare_windows (two-window row-count delta) and top_values (parallel multi-field top values).
  • Discovery toolsgenerate_query (NL → SQL via logchef's AI endpoint) and get_all_field_dimensions (bulk LowCardinality top values).
  • validate_logchefql — syntax check without executing.
  • get_query_telemetry — recent query performance from system.query_log (query text excluded for privacy).
  • docs/setup.md with per-provider setup (Claude Code, Claude Desktop, Cursor, VS Code, Codex CLI, Windsurf, Docker) and docs/tools.md with the full tool/resource/prompt reference.

Fixed (previously unreleased)

  • jsonschema tag format — struct tags updated from the invopop format ("description=X,required") to the google/jsonschema-go format ("X"). The old format silently produced empty input schemas.
  • URL parameter injection in GetFieldValues — uses url.PathEscape / url.Values instead of raw string interpolation.
  • Unbounded log contextget_log_context before/after limits capped at 100.
  • Query text leakageget_query_telemetry no longer returns the query column from system.query_log.
  • Alert prompt argsinvestigate_alert no longer drops required IDs.

Removed

  • Custom tool wrapper — Deleted tools.go (228 lines) and the invopop/jsonschema reflection-based schema generator.
  • 5 transitive dependenciesinvopop/jsonschema, go-ordered-map/v2, easyjson, generic-list-go, buger/jsonparser.

How to upgrade

Go install

go install github.com/mr-karan/logchef-mcp/cmd/logchef-mcp@v0.3.0

Docker

docker pull ghcr.io/mr-karan/logchef-mcp:v0.3.0

Check server compatibility

This release requires logchef v1.6.0+. On older logchef servers the saved-query and alert tools will 404.


Full changelog: v0.2.0...v0.3.0