Add MCP usage skill for StreamKit agents#386
Conversation
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
|
✅ Reviewed on |
| - `list_nodes` — all node definitions (kind, schema, pins, categories) | ||
| - `get_node_definition(kind)` — single node lookup by kind | ||
| - `list_plugins` — installed plugins with version/type | ||
| - `list_samples(mode?)` — sample pipelines (filter: oneshot/dynamic/demo/user) |
There was a problem hiding this comment.
🟡 SKILL.md documents non-existent modes for list_samples tool
The documentation claims list_samples(mode?) supports filtering by oneshot/dynamic/demo/user, but the actual implementation at apps/skit/src/mcp/mod.rs:782-792 only accepts "oneshot" and "dynamic" — any other value (including "demo" and "user") triggers an invalid_params error. An agent following this guide would get an error when trying to filter samples by demo or user mode.
| - `list_samples(mode?)` — sample pipelines (filter: oneshot/dynamic/demo/user) | |
| - `list_samples(mode?)` — sample pipelines (filter: oneshot/dynamic) | |
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
Good catch — this is actually a regression. My fix in PR #382 (commit e18b180) added all 4 modes, but it was lost during the merge (the squash used the original PR code). The current main only accepts oneshot/dynamic.\n\nI'll fix this in a separate PR on main to restore all 4 modes. Once that merges, the SKILL.md documentation will be accurate.
There was a problem hiding this comment.
Correction to my earlier reply: after investigating, the current code on main is actually correct. SamplePipeline.mode is derived from the pipeline YAML's mode: field (which is always "oneshot" or "dynamic" — the EngineMode enum). The demo/user prefixes in resource URIs refer to the subdirectory the sample lives in, not the pipeline mode.\n\nSo the filter correctly only accepts "oneshot" and "dynamic". I've updated the documentation in PR #385 to reflect this distinction and will fix this SKILL.md accordingly.
| - `apps/skit/src/mcp/mod.rs` — tool implementations, resource handlers | ||
| - `apps/skit/src/mcp/prompts.rs` — prompt definitions | ||
| - `apps/skit/tests/mcp_integration_test.rs` — integration tests | ||
| - `agent_docs/mcp.md` — full reference documentation |
There was a problem hiding this comment.
🟡 SKILL.md references non-existent file agent_docs/mcp.md
The "Key Files" section references agent_docs/mcp.md as a "full reference documentation" file, but this file does not exist in the repository. The agent_docs/ directory only contains: adding-plugins.md, architecture.md, common-pitfalls.md, e2e-testing.md, render-performance.md, skills-setup.md, and ui-development.md. An agent following this guide would waste time looking for a non-existent file.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
agent_docs/mcp.md is being added in PR #385 — once that merges, this reference will be valid.
| ### Tools (15) | ||
|
|
||
| **Discovery:** | ||
| - `list_nodes` — all node definitions (kind, schema, pins, categories) | ||
| - `get_node_definition(kind)` — single node lookup by kind | ||
| - `list_plugins` — installed plugins with version/type | ||
| - `list_samples(mode?)` — sample pipelines (filter: oneshot/dynamic/demo/user) | ||
| - `get_server_info` — server version, features, limits, plugin count | ||
|
|
||
| **Validation:** | ||
| - `validate_pipeline(yaml, mode?)` — validate YAML, get diagnostics | ||
| - `generate_oneshot_command(yaml, format)` — generate curl/skit-cli command | ||
|
|
||
| **Session lifecycle:** | ||
| - `create_session(yaml)` — create dynamic session from YAML | ||
| - `list_sessions` — list active sessions | ||
| - `get_pipeline(session_id)` — full pipeline state | ||
| - `destroy_session(session_id)` — stop and remove session | ||
|
|
||
| **Live mutation:** | ||
| - `validate_batch(session_id, operations)` — dry-run mutations | ||
| - `apply_batch(session_id, operations)` — apply mutations atomically | ||
| - `tune_node(session_id, node_id, message)` — send UpdateParams | ||
|
|
||
| **Diagnostics:** | ||
| - `get_logs(limit?, level?, filter?)` — recent server log lines | ||
|
|
||
| ### Prompts (2) | ||
| - `design_pipeline(description?)` — node catalog + YAML format guide | ||
| - `debug_pipeline(session_id)` — pipeline state + diagnostic checklist |
There was a problem hiding this comment.
📝 Info: Tool count and names verified against implementation
The SKILL.md claims 15 tools. I counted 15 #[tool(...)]-annotated methods in apps/skit/src/mcp/mod.rs: list_nodes, validate_pipeline, create_session, list_sessions, get_pipeline, generate_oneshot_command, destroy_session, validate_batch, apply_batch, get_logs, list_samples, get_server_info, tune_node, list_plugins, get_node_definition. All match the documentation. The 2 prompts (design_pipeline, debug_pipeline) in apps/skit/src/mcp/prompts.rs also match.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
| - `debug_pipeline(session_id)` — pipeline state + diagnostic checklist | ||
|
|
||
| ### Resources | ||
| - Sample pipelines as `streamkit://samples/{mode}/{id}` URIs |
There was a problem hiding this comment.
📝 Info: Resource URI format inconsistency between list_resources and read_resource
The list_resources handler at apps/skit/src/mcp/mod.rs:994 constructs URIs as streamkit://samples/{s.id} where s.id is already namespaced like oneshot/foo or dynamic/bar (per apps/skit/src/samples.rs:165-169). So the actual URIs end up as streamkit://samples/oneshot/foo which matches the streamkit://samples/{mode}/{id} template documented in the SKILL.md. The read_resource handler at line 1031 splits on / to extract mode and id, which is consistent. No bug here, but the indirection through s.id containing the mode prefix is worth noting for future maintainers.
Was this helpful? React with 👍 or 👎 to provide feedback.
Add a Devin skill file documenting how to use StreamKit's embedded MCP server for real agent tasks — pipeline design, session management, debugging, and sample browsing.
Devin Session: https://staging.itsdev.in/sessions/52941ef4b9a94602aefd654671069164