Skip to content

[Teams] Split out list_teams from get_team details - #54

Merged
gremsam merged 3 commits into
mainfrom
split-out-list-teams
Oct 14, 2026
Merged

gremsam merged 3 commits into
mainfrom
split-out-list-teams

Conversation

@gremsam

@gremsam gremsam commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Background
list_teams returns a ton of info about teams for a tool which receives a
lot of traffic

Change
Split between list_teams and get_team

**Backgound**
list_teams returns a ton of info about teams for a tool which receives a
lot of traffic

**Change**
Split between list_teams and get_team
@gremsam
gremsam requested review from a team and a balanced review from Copilot October 6, 2026 20:11
Comment thread src/tools/teams.ts
Comment on lines +6 to +9
// Explicit pick so new API fields (and the multi-KB certificate) stay out of the list.
export function summarizeTeam({ identifier, name, production, created_at }: Team): TeamSummary {
return { identifier, name, production, created_at };
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is where we're removing the fields

fred-gremlin
fred-gremlin previously approved these changes Oct 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Team names containing URL-reserved characters are not encoded before being inserted into the request path.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Splits lightweight team listings from detailed team retrieval to reduce list_teams payload size.

Changes:

  • Adds and registers get_team.
  • Restricts list_teams to summary fields.
  • Updates types, tests, documentation, and version metadata.
File Description
src/​tools/​teams.ts Implements team summaries and get_team.
src/​tools/​index.ts Registers the new tool.
src/​client/​gremlin.ts Expands team typing and fetches individual teams.
src/​resources/​index.ts Uses the corrected wire-format company ID.
src/​server.ts Bumps server version.
tests/​unit/​tools-index.test.ts Tests team tool behavior.
tests/​unit/​gremlin-client.test.ts Tests individual-team responses.
tests/​integration/​mcp-server.test.ts Covers the new tool and summary shape.
Readme.md Documents both team tools.
package.json Bumps package version.
package-lock.json Updates locked version metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/client/gremlin.ts Outdated
Encode teamId in the request URL to handle special characters.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The unintended removal of Rollup libc selectors should be reverted to preserve correct platform-specific installation behavior.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@gremsam
gremsam enabled auto-merge (squash) October 6, 2026 22:45
@gremsam
gremsam disabled auto-merge October 6, 2026 22:45
@gremsam
gremsam enabled auto-merge (squash) October 6, 2026 22:46
Comment thread src/client/gremlin.ts
export class GremlinApi {
private baseUrl: string = getServiceUrl();
private userAgent = "@gremlin/gremlin-mcp/2.5.0";
private userAgent = "@gremlin/gremlin-mcp/2.6.0";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would there be value in deriving this from the package.json?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a make command which requires this

Comment thread src/server.ts

export const SERVER_NAME = 'Gremlin Inc Server';
export const SERVER_VERSION = '2.5.0';
export const SERVER_VERSION = '2.6.0';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would there be value in deriving this from the package.json?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These come from a build script

@gremsam
gremsam merged commit 7eb7007 into main Oct 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants