# listTools()

Canonical URL: https://developers.iagenify.com/sdk/ref/mcp-client/list-tools/
Language: en

`client.listTools({ signal? }) → Promise<Tool[]>`

Every tool the server offers, following pagination to the end — with a ceiling, so a talkative server cannot keep it going for ever.

Status: 30 s · 20 pages at most · raw schemas

```javascript
const tools = await client.listTools();
// [{ name: "search_docs", description: "…", inputSchema: { … } }]
```

## It follows the pages {#pagination}

Up to twenty of them. Past that it stops with what it has — a server that paginates for ever would otherwise hold the call open until the timeout.

## The schemas are raw {#raw}

> **Do not hand these to a provider directly**
>
> They are exactly what the server declared, references and unusual constructs included. A provider that refuses one fails the whole turn. Run them through sanitizeSchema() — or use api.mcp.tools(), which has already done it.

## The schema can ask for headers {#annotations}

A tool may annotate parameters that must travel as HTTP headers rather than in the body. Those annotations are read only along a direct chain of properties — one placed under a construct that could branch makes the tool's definition invalid, because there would be no single path to read in the arguments.

## Initialise first {#initialize-first}

The handshake settles the revision, which decides what the listing call must carry. Calling this first is an error the server will report rather than a convenience.

## The account's version {#api-mcp}

[get(name, { refresh: true })](/sdk/ref/mcp/get) does this and records the result, keeping your allowed list untouched.

- [sanitizeSchema()](/sdk/ref/mcp-client/sanitize-schema): Before a provider sees them.
- [discovered · rejectedTools](/sdk/ref/mcp-client/discovered): What was left out, and why.

```python
tools = client.list_tools()
# [{"name": "search_docs", "description": "…", "inputSchema": {…}}]
```
