{"uid":"cap_caaZc3BbXBArvQVEZ1daC","slug":"s2ar-symbol-reader-d75cc6fc","name":"s2ar Symbol Reader","description":"Function source from a GitHub repo — one symbol with its doc comment, by name. GET ?repo=&file=&symbol=","url":"https://api.s2ar.dev/x402/v1/sym/read?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","required":["repo","file","symbol"],"properties":{"ref":{"type":"string","description":"branch, tag or commit; the default branch when omitted"},"file":{"type":"string","description":"path inside the repository"},"repo":{"type":"string","description":"a public GitHub, GitLab or Codeberg repository: owner/repo, github.com/owner/repo or its https URL"},"symbol":{"type":"string","description":"a name as sym ls lists it"}},"additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_z8r3HKjBJmG9228EkLRF7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a single named symbol (function, type, method, etc.) along with its doc comment from a public GitHub, GitLab, or Codeberg repository source file.","exampleAgentPrompt":"Can you grab the source code and doc comment for the `parseQueryString` function from the file `src/utils/query.ts` in the repo `acme-org/my-project` on GitHub?","exampleUseCases":[{"title":"Understanding an open-source library function","prompt":"Pull up the source and docs for the `retry` function in `lib/http/client.go` from the repo `golang/net` — I want to understand how it works before I call it."},{"title":"Reviewing a colleague's implementation","prompt":"Fetch the implementation of the `validateUser` symbol from `src/auth/validators.py` in `myteam/backend-api` at the `main` branch so I can review what it does."},{"title":"Documenting an undocumented codebase","prompt":"Read the `encryptPayload` function from `crypto/payload.ts` in the `open-payments/sdk` repo and show me whatever doc comment is attached to it — I'm trying to write better docs for our fork."}],"resultDescription":"Returns the full source text of the named symbol (function, class, type, method, etc.) along with its associated doc comment, scoped to the exact file and optionally a specific git ref (branch, tag, or commit) within the repository.","failureModes":["Symbol name not found in the specified file — returns an error or empty result","Repository is private or inaccessible — access denied","Invalid or non-existent file path — file not found error","Unknown or invalid git ref specified — ref resolution failure","Malformed repository identifier — parsing error","Network timeout accessing the upstream repository"],"whenToPreferThis":"Use this endpoint when you need the exact implementation and documentation of a single, specifically named symbol in a public repo, and you already know the file path and symbol name. It is more precise than a semantic code search and cheaper than fetching an entire file or repo map. Prefer it over broader search endpoints when the symbol name is known and you only need one definition.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:30:04.144Z","isFirstParty":false,"canonicalSlug":"s2ar-symbol-reader-d75cc6fc"}