error-shape-for-agents
/error-shape-for-agents
Projektuje komunikaty o błędach dla agentów: co się nie udało, dlaczego i jakie wywołanie zadziała w następnym kroku.
- Autor
- Wsh7Ash ↗
- Repozytorium
- skillmcp ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 29.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 2
Brak sygnałów. Repozytorium zmienione 29.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Projektuje komunikaty o błędach dla agentów: co się nie udało, dlaczego i jakie wywołanie zadziała w następnym kroku.
Oryginalny opis (EN)
Return errors an agent can act on: what failed, why, and the next call that would work. Use when a tool can fail because of bad arguments, missing files or an empty result
Jak działa
- Procedure
- Signals
- Patterns
- Pitfalls
- Done when
- References
Podgląd SKILL.md
---
name: error-shape-for-agents
description: "Return errors an agent can act on: what failed, why, and the next call that would work. Use when a tool can fail because of bad arguments, missing files or an empty result"
pack: skillmcp
version: 1.0.0
category: ai-tool
tags: [design, errors, agents]
---
# Error Shape For Agents
> Return errors an agent can act on: what failed, why, and the next call that would work
**Use when:** a tool can fail because of bad arguments, missing files or an empty result
**Avoid when:** the tool cannot fail, such as a constant return
## Procedure
1. Separate protocol errors from tool-level failures
2. Use JSON-RPC errors for malformed requests and invalid params
3. Use a tool result with isError for failures inside a valid call
4. Name the failing input and the accepted shape in the message
5. Suggest the next call, such as list_packs when a slug is unknown
6. Never return a bare stack trace as the only content
## Signals
- an unknown slug returns isError with a suggestion to list packs
- invalid params carry the offending key name
- the message distinguishes not-found from unreadable
- no traceback reaches the client
## Patterns
**1. Tool failure**
```text
{"content": [{"type": "text", "text": "..."}], "isError": true}
```
**2. Protocol failure**
```text
{"error": {"code": -32602, "message": "invalid params"}}
```
**3. Actionable text**
```text
unknown skill 'x'; try search_skills first
```
## Pitfalls
- Returning isError for a malformed request instead of a JSON-RPC error
- Leaking a filesystem path or a stack trace into the tool result
- Returning success with empty content when the lookup failed
## Done when
- protocol errors and tool failures are distinguishable by shape
- each error names the input and suggests a next step
## References
- [JSON-RPC 2.0 - error object](https://www.jsonrpc.org/specification)
- [MCP - tools result](https://modelcontextprotocol.io/specification/2025-03-26/server/tools)
Wersje
W bazie nie ma innych skilli o nazwie error-shape-for-agents.
Migawka bazy z 13.11.2026 · wersja paczki 70378d64d462 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100debug-runs
Znajduje i czyta uruchomienia czatu agenta po identyfikatorze, adresie e-mail lub linku do obiektu, a potem ustala, co się nie udało. - 100agent-tools
Projektuje i przegląda narzędzia wywoływane przez agenta LLM: definicje, schematy JSON, opisy, komunikaty błędów i serwery MCP. - 100agent-tool-design
Projektuje warstwę interfejsu narzędzi agenta: opisy umożliwiające routing, schematy i formaty odpowiedzi, nazewnictwo, komunikaty błędów z naprawą, serwery MCP i konsolidację zestawu narzędzi. - 100tool-design
Pomaga projektować interfejs narzędzi agenta: opisy, schematy, formaty odpowiedzi, nazewnictwo, komunikaty błędów, serwery MCP i konsolidację zestawu narzędzi. - 100tool-design
Projektuje narzędzia wywoływane przez model: nazwy, kształt parametrów, wynik i komunikaty błędów jako instrukcje do wykonania, a także przegląd cudzych powierzchni narzędzi. - 100repo-agents
Ujednolica plik instrukcji agentów AGENTS.md i CLAUDE.md w repozytorium, dopisując listę dokumentów i reguł, których kod nie pokazuje.