get_sdk_methods
Shows how to call an endpoint through your generated SDKs. The code an agent should write, rather than a guess at your SDK's names. Snippets come from your SDK settings, so they use your client shape: your package name, namespaces and method names.
When it's listed
On every server, in every tool mode. A tool group can leave the documentation tools out.
Arguments
slugstringOne endpoint, by slug. Leave it out for every endpoint.
languagestringOne language, such as typescript, python or go. Leave it out for every language you generate.
projectIdstringThe project to read. Leave it out: the server already knows its project, and passing another one reads that project instead.
Returns
A heading per endpoint with its SDK method name and METHOD /path, then a snippet per language.
Hints
The annotations a client reads to decide what may run without asking the user.
| Hint | Value | When true, it means |
|---|---|---|
readOnlyHint | true | It doesn't change anything |
destructiveHint | false | It can change or delete data |
idempotentHint | true | Calling it twice does no more than once |
openWorldHint | true | It reaches outside the server, over the network |
Examples
One endpoint in one language
{
"name": "get_sdk_methods",
"arguments": {
"slug": "post-customers",
"language": "typescript"
}
}## Create a customer: `createCustomer()`
`POST /customers`
**typescript**
```typescript
import { Client } from "acme-sdk";
const client = new Client({
baseUrl: "https://api.acme.com/v1",
auth: { bearer: process.env.API_TOKEN! },
retry: { maxAttempts: 3 },
});
const result = await client.customers.create({
name: "Untitled",
email: "jane.doe@example.com",
});
```Related
- Documentation tools:
search_docs,get_endpoint,list_endpoints,get_guide,list_sdks,get_changelog. - Documentation tools: how agents use these together.
- Search and AI chat: the same search, for people on your docs site.