Skip to content

[Reporting] Add reports for attacks, clients, and Usage#7

Open
gremsam wants to merge 5 commits intomainfrom
usage
Open

[Reporting] Add reports for attacks, clients, and Usage#7
gremsam wants to merge 5 commits intomainfrom
usage

Conversation

@gremsam
Copy link
Collaborator

@gremsam gremsam commented Feb 6, 2026

Background
We have feature requests for access to additional reporting endpoints based on usage

Change
This PR adds 3 major tools

  1. get_pricing_report -> this tool queries the billable agents and attacks (regardless of plan configuration)
  2. get_client_summary -> this tool queries agent usage on a per team basis to understand which teams are using agents
  3. get_attack_summary -> this tool queries attack usage on a per team basis to understand which teams are running gremlin fault injection

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new reporting/usage tools to the Gremlin MCP server, along with a Vitest-based integration test suite to exercise the expanded tool surface area against the live Gremlin API.

Changes:

  • Add 3 new MCP tools (get_pricing_report, get_client_summary, get_attack_summary) backed by new Gremlin API client methods.
  • Add Vitest configuration + integration tests and wire make test / npm test to run them.
  • Bump service/package versions to 1.1.0 and update docs for the new endpoints and testing workflow.

Reviewed changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vitest.config.ts Adds Vitest configuration for running integration tests.
tsconfig.json Adjusts TS project settings (notably rootDir and exclude).
tests/integration/mcp-server.test.ts New end-to-end integration tests validating tool registration and core tool behaviors.
src/tools/services.ts Updates list_services tool schema.
src/tools/reliability-management.ts Fixes get_reliability_experiments handler to return results.
src/tools/index.ts Registers the new company reporting tools.
src/tools/company.ts Implements the 3 new reporting tools and their schemas.
src/main.ts Bumps MCP server version to 1.1.0.
src/client/gremlin.ts Adds client methods/types for pricing and usage report endpoints; bumps user-agent version.
package.json Bumps package version, adds Vitest, updates test script.
package-lock.json Locks new Vitest/Vite dependency graph.
Readme.md Documents new reporting tools and how to run integration tests.
Makefile Adds test target that builds then runs Vitest.
CLAUDE.md Documents preferred build/test commands.
.gitignore Ignores .env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +79 to +83
schema: {
"$schema":"https://json-schema.org/draft/2020-12/schema",
"type":"object",
"properties":{}
},
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The schema for list_services is now a JSON Schema object (with $schema, type, properties), but the MCP server registration (server.tool(...)) and the rest of the tools in this repo pass a Zod raw shape (e.g., { teamId: z.string() }). Passing plain strings here is likely to break tool registration / argument validation at runtime. Use an empty Zod schema (e.g., {}) for a no-arg tool, or otherwise provide Zod types for each key instead of JSON Schema metadata.

Suggested change
schema: {
"$schema":"https://json-schema.org/draft/2020-12/schema",
"type":"object",
"properties":{}
},
schema: { },

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 23
"devDependencies": {
"@types/node": "^24.0.10",
"esbuild": "^0.25.8",
"typescript": "^5.8.3"
"typescript": "^5.8.3",
"vitest": "^4.0.18"
}
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Adding vitest@^4.0.18 pulls in vite@7.x (per the lockfile) which declares Node engine ^20.19.0 || >=22.12.0. This is a breaking change for environments still on Node 18 (which is otherwise compatible with @modelcontextprotocol/sdk’s >=18 requirement). Either pin Vitest/Vite to a version that supports Node 18, or add an engines.node constraint + CI update so installs/runs don’t fail unexpectedly.

Copilot uses AI. Check for mistakes.
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.

2 participants