agentleFS
tomaspavlintomaspavlin/rohlik-mcp/.claude/skills/test-mcp/SKILL.md

test-mcp

Skill119 starsChanged 8 months agoMITView on GitHub

Build and test MCP tools using direct API calls or MCP Inspector. Use when testing tool changes, verifying API responses, debugging MCP tools, or investigating what an API endpoint returns.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. mrieck/snipkiwi-design-extract★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever you need to:

    line 13
  2. Very specific:

    Run npm run build to compile TypeScript.

    line 21
  3. Very specific:

    Call API methods directly using Node with the .env file for credentials:

    line 25
  4. Very specific:

    If the user wants to test the full MCP tool flow (not just the API), tell them to run npm run inspect in a separate terminal.

    line 42
  5. Very specific:

    If the user provides a specific tool name via $ARGUMENTS, suggest they test that tool.

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing MCP Tools

Use this skill whenever you need to:

  • Investigate what an API endpoint returns (e.g. before updating a tool's field mappings)
  • Verify that tool changes correctly map API response fields
  • Debug why a tool returns wrong or missing data
  • Test tool changes after implementation

1. Build the project

Run npm run build to compile TypeScript. Fix any compilation errors before proceeding.

2. Call the API directly

Call API methods directly using Node with the .env file for credentials:

node --env-file=.env --input-type=module -e "
import { RohlikAPI } from './dist/rohlik-api.js';
const api = new RohlikAPI({ username: process.env.ROHLIK_USERNAME, password: process.env.ROHLIK_PASSWORD });
const result = await api.methodName(args);
console.log(JSON.stringify(result, null, 2));
"

Replace methodName and args with the appropriate API method. Check src/rohlik-api.ts for available methods.

This lets you inspect the raw API response shape to understand what fields are available, verify field names, and confirm your tool's output matches the actual data.

3. MCP Inspector (manual testing)

If the user wants to test the full MCP tool flow (not just the API), tell them to run npm run inspect in a separate terminal. The Inspector provides a web UI to invoke individual MCP tools with custom arguments.

If the user provides a specific tool name via $ARGUMENTS, suggest they test that tool.

4. Debugging with console.error

MCP servers communicate over stdout (used for the JSON-RPC protocol), so console.log output is invisible in the Inspector.

Always use console.error for debug logging. It writes to stderr, which is visible in the terminal where the Inspector was launched.

Example:

console.error('[ROHLIK_DEBUG] Response:', JSON.stringify(response, null, 2));

Remember to remove debug logging before committing.

5. Unit tests

For logic-only changes (no API calls), run npm test to execute unit tests. Use npm run test:watch during development.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.