sdk-docs
v1.4.2Orderly SDK documentation runtime: MCP server, exact indexes, and narrative (QMD) retrieval
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
orderly_docs_health
Returns Orderly SDK docs bundle metadata (gitSha, generatedAt, paths). Use to verify repo-local or embedded generated artifacts.
orderly_docs_search
Search Orderly SDK documentation (narrative markdown, recipes, workflows). Returns a DocsResult with ranked narrativeHits; when present, matchedEntityId or keywordSingletonId point to a concrete symbol — call orderly_docs_get_component, orderly_docs_get_type, or orderly_docs_get_hook next (check matchedEntityKind for the right tool). Response may also include queryVariants, inferredPackages, and packageSurfaceHints to guide follow-up exact lookups. Optional filters: k (max hits), kinds, packages.
| Parameter | Type | Description |
|---|---|---|
query * | string | Free-text search query |
k | integer | Max hits (1-50) |
kinds | array | |
packages | array |
orderly_docs_get_component
Exact component metadata (props, etc.) by symbol, @package/name:Export, component.* entity id, or interceptor target path (e.g. Trading.OrderEntry.SubmitSection). For interceptor targets without a concrete component entity, returns a type-backed fallback with propsType metadata. Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
query * | string | Symbol, @package/name:Export, or component.* id |
orderly_docs_get_component_doc
Component markdown (examples / narrative) by symbol, @package/name:Export, or component.* id. For props/types use orderly_docs_get_component first.
| Parameter | Type | Description |
|---|---|---|
query * | string | Symbol, @package/name:Export, or component.* id |
orderly_docs_get_type
Exact type / enum metadata by symbol, @package/name:Name, or type.* entity id. Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
query * | string |
orderly_docs_get_hook
Exact hook metadata (params, returns, jsDoc) by symbol name, @package/name:HookName, or hook.* entity id. Hooks (`useMarkPrice`, `useOrderEntry`, etc.) are the primary API for plugin developers. Hook `returns` types may be unions that are not valid React children until narrowed (e.g. `typeof x === 'number'` before rendering in JSX). Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
query * | string | Symbol name, @package/name:HookName, or hook.* id |
orderly_docs_get_package_surface
Lists export names for an npm package (e.g. @orderly.network/ui). Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
packageName * | string |
orderly_docs_get_release_context
Manifest + optional build-stamp.json for gitSha / generatedAt. Returns DocsResult JSON.
orderly_docs_get_workflow
Curated workflow markdown (slug without .md). Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
slug * | string | e.g. wallet-connect for workflows/wallet-connect.md |
orderly_docs_get_recipe
Minimal recipe markdown (name without .md). Returns DocsResult JSON.
| Parameter | Type | Description |
|---|---|---|
name * | string |
orderly_docs_get_guardrails
Guardrails and safety constraints markdown. Returns DocsResult JSON.
orderly_docs_fetch_sdk_source
Fetch source file text from the public Orderly JS SDK GitHub repo (OrderlyNetwork/js-sdk). Default ref is branch `main` unless `ORDERLY_SDK_GITHUB_REF` is set. If that ref returns HTTP 404 (e.g. unpublished local SHA), the tool retries once on `main`. Repo-relative paths only (e.g. packages/ui/src/button/button.tsx). Optional line/endLine returns excerpt; data.text is always full file.
| Parameter | Type | Description |
|---|---|---|
relPath * | string | Repo-relative path, e.g. packages/ui/src/avatar/avatar.tsx |
contextLines | integer | Half-window around line when only line is set (default 15) |
endLine | integer | 1-based inclusive end line (range with line) |
line | integer | 1-based line for excerpt center or range start |