Skip to content

Simplify MCP contract sorting with slices helpers #2362

Description

@luangucun

Problem

The MCP tools code uses custom index-based callbacks for both natural string ordering and contract ordering.

Proposed change

Use slices.Sort for naturally ordered strings and slices.SortFunc for contract values. The output order remains unchanged.

Scope

This is an internal refactor with no command-line, MCP schema, or user-visible behavior changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions