# Fetch Agent Card

> Fetch an A2A agent card JSON from a given endpoint URL. Tries direct GET first, then falls back to /.well-known/agent.json.

- Skill: `ai-sns/fetch-agent-card` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ai-sns/fetch-agent-card`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ai-sns/fetch-agent-card/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ai-sns (https://skillmd.com/u/ai-sns)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ai-sns/fetch-agent-card

---


This skill fetches the agent card (JSON) from an A2A endpoint.

**Input parameters** (via stdin JSON):
- `url` (string, required): The A2A endpoint URL to fetch the agent card from.

**Output** (stdout JSON):
- `ok` (bool): Whether the fetch succeeded.
- `card` (string): The raw agent card JSON text (truncated to 2000 chars).
- `source` (string): `"direct"` or `"well_known"` indicating which fetch strategy succeeded.
- `error` (string): Error message if both attempts failed.

