github 42futures/firm 0.5.0
Firm 0.5.0

8 hours ago

This release adds an MCP server for AI assistant integration, query aggregations for computing summary values, compound query conditions, and several CLI improvements.

MCP server

Firm now includes a local Model Context Protocol server, enabling AI assistants like Claude Desktop to interact with your workspace directly:

firm mcp

The server exposes tools for querying, listing, and getting entities, adding new entities with validation, reading and writing source files with automatic rollback on error, and an in-context DSL reference.

Query aggregations

Queries can now end with an aggregation clause to compute summary values from the result set:

firm query 'from task | where is_completed == false | count'
firm query 'from invoice | where status == "sent" | sum amount'
firm query 'from task | select @id, name, due_date'

Supported aggregations:

  • select - Extract specific field values from entities
  • count - Count entities, optionally filtering by field presence
  • sum - Sum a numeric field (integer, float, or currency)
  • average - Compute the mean of a numeric field
  • median - Compute the median of a numeric field

Compound query conditions

where clauses now support combining multiple conditions with and or or:

firm query 'from invoice | where status == "draft" or status == "sent"'
firm query 'from task | where is_completed == false and priority > 5'

New features

  • Source command - firm source <type> <id> locates the source file where an entity or schema is defined
  • Schema in get command - firm get schema <name> displays schema details
  • Documentation site - mdbook-based docs deployed to GitHub Pages

Improvements

  • Schema display now shows allowed enum values
  • Invalid queries (unsupported operators, unknown entity types, invalid dates) now return descriptive errors instead of failing silently
  • firm list outputs only entity IDs or schema names for a cleaner overview

⚠️ Breaking changes

Query return type: Query::execute now returns a QueryResult enum (entities or aggregation result) instead of Vec<&Entity>.

Full changelog: https://github.com/42futures/firm/blob/0.5.0/CHANGES.md

Don't miss a new firm release

NewReleases is sending notifications on new releases.