• v0.2.0 13a186c60a

    Rene Nochebuena released this 2026-06-10 10:39:12 -06:00 | 0 commits to main since this release

    v0.2.0

    code.nochebuena.dev/einherjar/mcp

    Minor release. The framework indexer now captures the members of composite
    types — struct fields (with their tags) and interface method sets — closing a
    gap where get_symbol and search_symbols could name a type but not describe
    its shape. Additive and backward-compatible: no breaking changes.


    Changes

    internal/index — schema

    • Symbol gains fields and methods. A struct-type symbol now carries
      a fields array (field name, type, raw struct tag with backticks
      stripped, doc comment, and an embedded flag); an interface-type symbol now
      carries a methods array (method name, signature without the leading
      func, doc comment), embedded interfaces included. Both are omitempty and
      absent for every other kind.
    • SchemaVersion is unchanged. The two additions are additive and
      omitempty, so a consumer built against the v0.1.x index parses the new
      index without modification.

    internal/index — builder

    • The builder previously truncated every declaration at the first {, so the
      index stored only the one-line type X struct / type X interface header
      and dropped all field and method detail — including struct tags such as
      env:"EINHERJAR_PG_HOST". It now inspects each type's TypeSpec and fills
      the new Symbol members via a non-truncating printer, alongside the existing
      one-line Signature.

    Tools

    • get_symbol now returns a struct's fields (with tags) and an interface's
      method set in addition to the signature, doc, and source location.
    • search_symbols now also matches the query against struct field names,
      field types, and struct tags, and against interface method names and
      signatures — so an env-var key or a method name resolves to the type that
      declares it.

    Tests

    • New internal/index/builder_test.go (the package had no tests before)
      covers field/tag/embedded-field capture, interface-method and
      embedded-interface capture, and discovery of a struct by one of its tags.

    Docs

    • CHANGELOG.md and README.md updated to describe the richer get_symbol
      output and the broadened search_symbols matching.

    Upgrade Notes

    If you… Action
    Consume the MCP service from an MCP client (Claude, Cursor, Zed, etc.) None — responses are a strict superset; existing fields are unchanged, fields/methods are new and optional.
    Parse the index JSON directly None required — the schema version is unchanged and the new keys are omitempty additions. Read fields/methods to use them.
    Operate / deploy the service Rebuild and redeploy the image. The index is regenerated at image build (Dockerfile runs cmd/indexer); a running v0.1.x image keeps serving the older, member-less index until rebuilt. This redeploy also refreshes any index that had drifted behind the framework source.

    API

    No change to the count of the public surface: the 10 tools and 8 validation
    rules from v0.1.0 remain. What changed is additive — get_symbol returns
    struct fields and interface methods, search_symbols matches them, and the
    index schema gains two omitempty fields on Symbol. The schema version
    string is unchanged.


    Install

    go install code.nochebuena.dev/einherjar/mcp/cmd/server@v0.2.0
    

    Dependencies

    Module Version Status Role
    github.com/modelcontextprotocol/go-sdk v1.0.0 unchanged from v0.1.1 Official Go MCP SDK — server, streamable-HTTP transport, tool registration
    github.com/coreos/go-systemd/v22 v22.7.0 unchanged from v0.1.1 Inherit listener from systemd via LISTEN_FDS; loaded only by cmd/server
    github.com/google/jsonschema-go v0.3.0 unchanged (indirect) JSON Schema generation for tool input/output validation
    github.com/yosida95/uritemplate/v3 v3.0.2 unchanged (indirect) RFC 6570 URI template support used by the SDK

    No dependencies added, removed, or upgraded in this release.

    Downloads