---
title: "nuxt-backend/mcp"
description: "Every export of nuxt-backend/mcp, with its signature and where it is defined."
canonical_url: "https://nuxt-backend.dev/docs/reference/api/mcp"
---
# nuxt-backend/mcp

**Experimental**

The agent (MCP) surface's Nitro utilities — `nuxt-backend/mcp`, also
auto-imported in `server/`: [useBackendMcp](#usebackendmcp) for the signed-in agent
session behind a tool call, [defineBackendMcpTool](#definebackendmcptool) for your own tools.

Experimental: the MCP authorization profile it implements (OAuth 2.1 +
protected-resource metadata) and `@nuxtjs/mcp-toolkit` are both still
moving, so this entry's shape may change in a minor release — the rest of
the package holds the STABILITY.md promise.

## Interfaces

### ExchangeCache

Defined in: [src/runtime/server/mcp/cache.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts)

**Experimental**

In-memory TTL + LRU cache for resolved agent sessions, keyed by the opaque
OAuth Bearer. One exchange round trip per token per JWT lifetime: entries
expire with the minted Convex JWT (minus a safety margin so a cached JWT is
never handed out moments before it lapses), which also bounds how long a
revoked agent token keeps working. Pure and clock-injectable for tests.

#### Type Parameters

<table>
<thead>
  <tr>
    <th>
      Type Parameter
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="type-parameter-value">
        
      </a>
      
       <code>
        Value
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Modifier
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="get">
        
      </a>
      
       <code>
        get
      </code>
    </td>
    
    <td>
      <code>
        public
      </code>
    </td>
    
    <td>
      (<code>
        key
      </code>
      
      ) => <code>
        Value
      </code>
      
       | <code>
        null
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts" rel="nofollow">
        src/runtime/server/mcp/cache.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="set">
        
      </a>
      
       <code>
        set
      </code>
    </td>
    
    <td>
      <code>
        public
      </code>
    </td>
    
    <td>
      (<code>
        key
      </code>
      
      , <code>
        value
      </code>
      
      , <code>
        ttlMs
      </code>
      
      ) => <code>
        void
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts" rel="nofollow">
        src/runtime/server/mcp/cache.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="size">
        
      </a>
      
       <code>
        size
      </code>
    </td>
    
    <td>
      <code>
        readonly
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts" rel="nofollow">
        src/runtime/server/mcp/cache.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BackendMcp

Defined in: [src/runtime/server/mcp/index.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts)

**Experimental**

The per-request agent context [useBackendMcp](#usebackendmcp) returns.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="session">
        
      </a>
      
       <code>
        session
      </code>
    </td>
    
    <td>
      <a href="#backendmcpsession-1">
        <code>
          BackendMcpSession
        </code>
      </a>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="hasscope">
        
      </a>
      
       <code>
        hasScope
      </code>
    </td>
    
    <td>
      (<code>
        scope
      </code>
      
      ) => <code>
        boolean
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="fetchquery">
        
      </a>
      
       <code>
        fetchQuery
      </code>
    </td>
    
    <td>
      <<code>
        Query
      </code>
      
      >(<code>
        query
      </code>
      
      , <code>
        args?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        FunctionReturnType
      </code>
      
      <<code>
        Query
      </code>
      
      >>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       Convex fetchers bound to the agent's short-lived user JWT.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="fetchmutation">
        
      </a>
      
       <code>
        fetchMutation
      </code>
    </td>
    
    <td>
      <<code>
        Mutation
      </code>
      
      >(<code>
        mutation
      </code>
      
      , <code>
        args?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        FunctionReturnType
      </code>
      
      <<code>
        Mutation
      </code>
      
      >>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="fetchaction">
        
      </a>
      
       <code>
        fetchAction
      </code>
    </td>
    
    <td>
      <<code>
        Action
      </code>
      
      >(<code>
        action
      </code>
      
      , <code>
        args?
      </code>
      
      ) => <code>
        Promise
      </code>
      
      <<code>
        FunctionReturnType
      </code>
      
      <<code>
        Action
      </code>
      
      >>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### BackendMcpSession

Defined in: [src/runtime/server/mcp/session.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/session.ts)

**Experimental**

The authenticated agent behind the current MCP request.

#### Properties

<table>
<thead>
  <tr>
    <th>
      Property
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="userid">
        
      </a>
      
       <code>
        userId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       The signed-in user the agent acts as.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/session.ts" rel="nofollow">
        src/runtime/server/mcp/session.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="clientid">
        
      </a>
      
       <code>
        clientId
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       The OAuth client (agent) id.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/session.ts" rel="nofollow">
        src/runtime/server/mcp/session.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="scopes">
        
      </a>
      
       <code>
        scopes
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
      
      <span>
        
      </span>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       Scopes the user consented to.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/session.ts" rel="nofollow">
        src/runtime/server/mcp/session.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="convextoken">
        
      </a>
      
       <code>
        convexToken
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        <code>
          Experimental
        </code>
      </strong>
      
       Short-lived Convex JWT for calling deployment functions as the user.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/session.ts" rel="nofollow">
        src/runtime/server/mcp/session.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Type Aliases

### BackendMcpToolDefinition

```ts
type BackendMcpToolDefinition<InputSchema, OutputSchema> = McpToolDefinition<InputSchema, OutputSchema> & {
  scope?: string;
};
```

Defined in: [src/runtime/server/mcp/index.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts)

**Experimental**

#### Type Parameters

<table>
<thead>
  <tr>
    <th>
      Type Parameter
    </th>
    
    <th>
      Default type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="type-parameter-inputschema">
        
      </a>
      
       <code>
        InputSchema
      </code>
      
       <em>
        extends
      </em>
      
       <code>
        ZodRawShape
      </code>
      
       | <code>
        undefined
      </code>
    </td>
    
    <td>
      <code>
        ZodRawShape
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="type-parameter-outputschema">
        
      </a>
      
       <code>
        OutputSchema
      </code>
      
       <em>
        extends
      </em>
      
       <code>
        ZodRawShape
      </code>
    </td>
    
    <td>
      <code>
        ZodRawShape
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Type Declaration

<table>
<thead>
  <tr>
    <th>
      Name
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        scope?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      OAuth scope required for this tool. Agents without it never see the tool in <code>
        tools/list
      </code>
      
      , and a direct call is refused — the handler-side check matters because list-time hiding is only advisory.
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts" rel="nofollow">
        src/runtime/server/mcp/index.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

## Variables

### BACKEND_MCP_FUNCTION_DEFAULTS

```ts
const BACKEND_MCP_FUNCTION_DEFAULTS: {
  getAuthUser: "auth:getAuthUser";
  updateProfile: "auth:updateProfile";
  getConfiguredProducts: "billing:getConfiguredProducts";
  getCurrentSubscription: "billing:getCurrentSubscription";
  getCredits: "billing:getCredits";
  generateCheckoutLink: "billing:generateCheckoutLink";
  generateCustomerPortalUrl: "billing:generateCustomerPortalUrl";
  listWorkspaces: "auth:listWorkspaces";
  listWorkspaceMembers: "auth:listWorkspaceMembers";
};
```

Defined in: [src/runtime/server/mcp/builtin.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts)

**Experimental**

The scaffold-named Convex functions the built-in tools call. Keys are the
override map's vocabulary (`backend.mcp.functions`); values assume the
scaffolded `auth.ts` / `billing.ts` module names.

#### Type Declaration

<table>
<thead>
  <tr>
    <th>
      Name
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default value
    </th>
    
    <th>
      Defined in
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="property-getauthuser">
        
      </a>
      
       <code>
        getAuthUser
      </code>
    </td>
    
    <td>
      <code>
        "auth:getAuthUser"
      </code>
    </td>
    
    <td>
      <code>
        'auth:getAuthUser'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-updateprofile">
        
      </a>
      
       <code>
        updateProfile
      </code>
    </td>
    
    <td>
      <code>
        "auth:updateProfile"
      </code>
    </td>
    
    <td>
      <code>
        'auth:updateProfile'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-getconfiguredproducts">
        
      </a>
      
       <code>
        getConfiguredProducts
      </code>
    </td>
    
    <td>
      <code>
        "billing:getConfiguredProducts"
      </code>
    </td>
    
    <td>
      <code>
        'billing:getConfiguredProducts'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-getcurrentsubscription">
        
      </a>
      
       <code>
        getCurrentSubscription
      </code>
    </td>
    
    <td>
      <code>
        "billing:getCurrentSubscription"
      </code>
    </td>
    
    <td>
      <code>
        'billing:getCurrentSubscription'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-getcredits">
        
      </a>
      
       <code>
        getCredits
      </code>
    </td>
    
    <td>
      <code>
        "billing:getCredits"
      </code>
    </td>
    
    <td>
      <code>
        'billing:getCredits'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-generatecheckoutlink">
        
      </a>
      
       <code>
        generateCheckoutLink
      </code>
    </td>
    
    <td>
      <code>
        "billing:generateCheckoutLink"
      </code>
    </td>
    
    <td>
      <code>
        'billing:generateCheckoutLink'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-generatecustomerportalurl">
        
      </a>
      
       <code>
        generateCustomerPortalUrl
      </code>
    </td>
    
    <td>
      <code>
        "billing:generateCustomerPortalUrl"
      </code>
    </td>
    
    <td>
      <code>
        'billing:generateCustomerPortalUrl'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-listworkspaces">
        
      </a>
      
       <code>
        listWorkspaces
      </code>
    </td>
    
    <td>
      <code>
        "auth:listWorkspaces"
      </code>
    </td>
    
    <td>
      <code>
        'auth:listWorkspaces'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="property-listworkspacemembers">
        
      </a>
      
       <code>
        listWorkspaceMembers
      </code>
    </td>
    
    <td>
      <code>
        "auth:listWorkspaceMembers"
      </code>
    </td>
    
    <td>
      <code>
        'auth:listWorkspaceMembers'
      </code>
    </td>
    
    <td>
      <a href="https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts" rel="nofollow">
        src/runtime/server/mcp/builtin.ts
      </a>
    </td>
  </tr>
</tbody>
</table>

---

### EXCHANGE_CACHE_MARGIN_MS

```ts
const EXCHANGE_CACHE_MARGIN_MS: 30000 = 30_000;
```

Defined in: [src/runtime/server/mcp/cache.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts)

**Experimental**

Marginal safety window between cache expiry and JWT expiry.

## Functions

### backendMcpFunction()

```ts
function backendMcpFunction(key, event?): string;
```

Defined in: [src/runtime/server/mcp/builtin.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/builtin.ts)

**Experimental**

Resolve a built-in tool's Convex function ref (`backend.mcp.functions` wins).

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        key
      </code>
    </td>
    
    <td>
      | <code>
        "getAuthUser"
      </code>
      
       | <code>
        "updateProfile"
      </code>
      
       | <code>
        "getConfiguredProducts"
      </code>
      
       | <code>
        "getCurrentSubscription"
      </code>
      
       | <code>
        "getCredits"
      </code>
      
       | <code>
        "generateCheckoutLink"
      </code>
      
       | <code>
        "generateCustomerPortalUrl"
      </code>
      
       | <code>
        "listWorkspaces"
      </code>
      
       | <code>
        "listWorkspaceMembers"
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        event?
      </code>
    </td>
    
    <td>
      <code>
        H3Event
      </code>
      
      <<code>
        EventHandlerRequest
      </code>
      
      >
    </td>
  </tr>
</tbody>
</table>

#### Returns

`string`

---

### createExchangeCache()

```ts
function createExchangeCache<Value>(options?): ExchangeCache<Value>;
```

Defined in: [src/runtime/server/mcp/cache.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/cache.ts)

**Experimental**

#### Type Parameters

<table>
<thead>
  <tr>
    <th>
      Type Parameter
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="type-parameter-value-1">
        
      </a>
      
       <code>
        Value
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      { <code>
        capacity?
      </code>
      
      : <code>
        number
      </code>
      
      ; <code>
        now?
      </code>
      
      : () => <code>
        number
      </code>
      
      ; }
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options.capacity?
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options.now?
      </code>
    </td>
    
    <td>
      () => <code>
        number
      </code>
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`ExchangeCache`](#exchangecache)<`Value`>

---

### useBackendMcp()

```ts
function useBackendMcp(event?): BackendMcp;
```

Defined in: [src/runtime/server/mcp/index.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts)

**Experimental**

The authenticated agent session behind the current MCP request, with
Convex fetchers bound to the user's short-lived JWT — so tool handlers
call deployment functions exactly as that signed-in user (`ctx.auth`,
workspace and billing entity resolution all behave like a web session).

Pass the H3 event where you have it; without one the current request is
read from Nitro's async context (enabled by the module). Throws a 401
H3Error when the request carries no agent session (the MCP gate answers
unauthenticated requests before tools run, so this only trips when called
outside a gated route).

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        event?
      </code>
    </td>
    
    <td>
      <code>
        H3Event
      </code>
      
      <<code>
        EventHandlerRequest
      </code>
      
      >
    </td>
  </tr>
</tbody>
</table>

#### Returns

[`BackendMcp`](#backendmcp)

---

### defineBackendMcpTool()

```ts
function defineBackendMcpTool<InputSchema, OutputSchema>(definition): McpToolDefinition<InputSchema, OutputSchema>;
```

Defined in: [src/runtime/server/mcp/index.ts](https://github.com/qruto/nuxt-backend/blob/main/src/runtime/server/mcp/index.ts)

**Experimental**

`defineMcpTool` with the agent-session contract: the tool is hidden from
unauthenticated requests, hidden without the required `scope`, and the
scope is re-checked when the handler runs. Compose extra visibility rules
via the standard `enabled` guard — it runs after the session/scope gate.

#### Type Parameters

<table>
<thead>
  <tr>
    <th>
      Type Parameter
    </th>
    
    <th>
      Default type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <a id="type-parameter-inputschema-1">
        
      </a>
      
       <code>
        InputSchema
      </code>
      
       <em>
        extends
      </em>
      
       | <code>
        Readonly
      </code>
      
      <{ [<code>
        k
      </code>
      
      : <code>
        string
      </code>
      
      ]: <code>
        $ZodType
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      , <code>
        $ZodTypeInternals
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      >>; }> | <code>
        undefined
      </code>
    </td>
    
    <td>
      <code>
        Readonly
      </code>
      
      <{ [<code>
        k
      </code>
      
      : <code>
        string
      </code>
      
      ]: <code>
        $ZodType
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      , <code>
        $ZodTypeInternals
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      >>; }>
    </td>
  </tr>
  
  <tr>
    <td>
      <a id="type-parameter-outputschema-1">
        
      </a>
      
       <code>
        OutputSchema
      </code>
      
       <em>
        extends
      </em>
      
       <code>
        Readonly
      </code>
      
      <{ [<code>
        k
      </code>
      
      : <code>
        string
      </code>
      
      ]: <code>
        $ZodType
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      , <code>
        $ZodTypeInternals
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      >>; }>
    </td>
    
    <td>
      <code>
        Readonly
      </code>
      
      <{ [<code>
        k
      </code>
      
      : <code>
        string
      </code>
      
      ]: <code>
        $ZodType
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      , <code>
        $ZodTypeInternals
      </code>
      
      <<code>
        unknown
      </code>
      
      , <code>
        unknown
      </code>
      
      >>; }>
    </td>
  </tr>
</tbody>
</table>

#### Parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        definition
      </code>
    </td>
    
    <td>
      <a href="#backendmcptooldefinition">
        <code>
          BackendMcpToolDefinition
        </code>
      </a>
      
      <<code>
        InputSchema
      </code>
      
      , <code>
        OutputSchema
      </code>
      
      >
    </td>
  </tr>
</tbody>
</table>

#### Returns

`McpToolDefinition`<`InputSchema`, `OutputSchema`>

## References

### BackendMcpFunctionKey

Re-exports [BackendMcpFunctionKey](https://nuxt-backend.dev/docs/reference/api/module#backendmcpfunctionkey)

---

### BackendMcpToolName

Re-exports [BackendMcpToolName](https://nuxt-backend.dev/docs/reference/api/module#backendmcptoolname)


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
