Simplify MCP contract sorting with slices helpers

Open Beginner friendly
#2,362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Search the MCP tools code for custom index-based callbacks that sort natural strings and contract values, then inspect the surrounding tests or callers. Replace those sorting paths with the specified slices helpers while preserving output order, and run the relevant Go tests to confirm there are no behavior changes.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Go
Stars
209
Forks
88
Avg merge
1d 17h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from onflow/flow-cli

All issues in onflow/flow-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.