agentleFS
Wsh7AshWsh7Ash/skillmcp/skills/lifecycle-test-initialize-then-tools/SKILL.md

lifecycle-test-initialize-then-tools

Skill0 starsChanged 14 days agoMITView on GitHub

Prove the handshake before the tool list, because a client never calls tools on a failed initialize. Use when a new server is being validated against a real client for the first time

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Call one tool and assert the result shape

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Lifecycle Test Initialize Then Tools

Prove the handshake before the tool list, because a client never calls tools on a failed initialize

Use when: a new server is being validated against a real client for the first time

Avoid when: the transport is already proven and only a single tool changed

Procedure

  1. Send initialize with a supported protocolVersion and client info
  2. Assert protocolVersion, capabilities and serverInfo in the reply
  3. Send the initialized notification and expect no reply
  4. Send tools/list and assert every tool has a name, description and schema
  5. Call one tool and assert the result shape
  6. Record the whole sequence as a transcript fixture

Signals

  • initialize returns before any tool call is attempted
  • the initialized notification produces no response line
  • tools/list returns a non-empty array with schemas
  • the first tool call succeeds on the same connection

Patterns

1. Handshake

initialize -> initialized -> tools/list -> tools/call

2. No reply

notifications never produce a response id

3. Schema check

each tool has inputSchema.type == 'object'

Pitfalls

  • Skipping the notification and wondering why a strict client stalls
  • Calling a tool before initialize completes
  • Asserting the tool list without checking schema presence

Done when

  • the full sequence passes on one connection in one process
  • the transcript fixture is committed

References

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.

Reviews can't be read right now.

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.