Missing Tool Result Block in Tool Use Sequence

Resolved 💬 1 comment Opened Apr 22, 2025 by aaronlippold Closed Jun 3, 2025

Bug Description
When trying to examine files in another directory with a statment like\
\
⏺ List(../saf-site-v3/content/1.docs/4.development)…
⎿ Listed 12 paths (ctrl+r to expand)

⏺ Let me examine the content of these files:

You got stuck again

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.32: tool_use ids were found without tool_result blocks
immediately after: toolu_017kTBy6BxBY5XoLvp859fs4. Each tool_use block must have a corresponding tool_result block in the next message."}}

Call(Reading development documentation files)…
⎿ Read(../saf-site-v3/content/1.docs/4.development/1.content-components.md)…
⎿ Read(../saf-site-v3/content/1.docs/4.development/2.markdown-best-practices.md)…
⎿ Read(../saf-site-v3/content/1.docs/4.development/5.nuxt-ui-with-content.md)…\
\
I keep getting the error above. I will attache the file 5.nuxt-ui-with-content.md as that is the one it seems to get stuck on.

Environment Info

  • Platform: macos
  • Terminal: vscode
  • Version: 0.2.76
  • Feedback ID: 9b9dba3d-9ace-4899-b20b-4ba0aba37751

Errors

[]
---
title: Using Nuxt UI with Nuxt Content
description: How to use Nuxt UI typography components with Nuxt Content
---

# Using Nuxt UI with Nuxt Content

This guide explains how to use Nuxt UI typography components with Nuxt Content's MDC (Markdown Components) syntax.

## Configuration

Make Nuxt UI components globally available in your application by adding the following to your `nuxt.config.ts` file:

```ts
export default defineNuxtConfig({
  // ... other config
  
  ui: {
    global: true,
    icons: {
      dynamic: true
    }
  }
})

With this configuration, all Nuxt UI components are directly available in your markdown files without any imports.

Built-in Typography Components

Nuxt UI Pro provides a rich set of built-in typography components that you can use directly in your markdown:

Callouts

Callouts are perfect for highlighting important information:

::callout{icon="i-heroicons-information-circle" color="blue"}
This is a callout with full **markdown** support.
::

You can also use shortcuts for different callout types:

::note
This is a note.
::

::tip
This is a tip.
::

::warning
This is a warning.
::

::caution
This is a caution notice.
::

Tabs

Create tabbed content for different code examples or configurations:

::tabs
  ::tab{name="Vue"}
    ```vue
    <template>
      <div>Hello Vue</div>
    </template>
    ```
  ::
  
  ::tab{name="React"}
    ```jsx
    function App() {
      return <div>Hello React</div>;
    }
    ```
  ::
::

Accordion

Create collapsible sections for detailed content:

::accordion
  ::accordion-item{title="Section 1"}
    Content for section 1
  ::
  
  ::accordion-item{title="Section 2"}
    Content for section 2
  ::
::

Steps

Create step-by-step guides with the steps component:

::steps
  ::step{title="Step 1"}
    Instructions for step 1
  ::
  
  ::step{title="Step 2"}
    Instructions for step 2
  ::
::

Cards

Use the card component for grouping related content:

::card{title="Card Title" icon="i-lucide-users" color="primary"}
Card content goes here.

- Item 1
- Item 2
::

You can also group cards together in a grid layout:

::card-group
  ::card{title="Card 1"}
    Content for card 1
  ::
  
  ::card{title="Card 2"}
    Content for card 2
  ::
::

Badges

Add inline badges to highlight features or statuses:

::badge
v3.0.0
::

::badge
Premium
::

Keyboard Shortcuts

Display keyboard shortcut instructions:

Press ::kbd{value="meta"} + ::kbd{value="K"} to open the command palette.

Steps

Create step-by-step guides using headings:

::steps{level="3"}

### First Step Title
Content for first step

### Second Step Title
Content for second step

### Third Step Title
Content for third step

::

Important formatting tips:

  • Use blank lines after opening and before closing the steps component
  • Use heading tags that match the level specified (e.g., h3 tags when level="3")
  • Don't include step numbers in the headings - they are automatically added
  • The level prop defines which heading level to use (e.g., "3" for h3 tags)

Best Practices for Components with Icons

When using icons within components, use direct HTML for icons:

::UCard
  **Card Title**
  
  <Icon name="i-heroicons-light-bulb" class="text-lg text-primary-500" />
  
  Card content goes here.
::

Component Naming Conventions

Important note about naming conventions:

  1. Built-in typography components use lowercase syntax:
  • ::card (not ::UCard)
  • ::callout (not ::UCallout)
  • ::tabs (not ::UTabs)
  1. For component compatibility:

Works Well: card, callout, badge, tabs, accordion, steps
⚠️ Use with Caution: Components with complex nested structures
Avoid: Components that rely heavily on props for content (use direct HTML instead)

Icon Usage

Icons work correctly with the following method:

<Icon name="i-heroicons-light-bulb" class="text-3xl text-yellow-500" />

Make sure to:

  • Install and configure @nuxt/icon module
  • Use the format i-[collection]-[name] for icon names

Troubleshooting

If components aren't resolving properly:

  1. Restart the Nuxt development server after configuration changes
  2. Verify components are globally registered with ui.global: true
  3. Simplify nested component structures
  4. Use direct HTML for icons rather than props

Example Page

For a complete working example, see the [Typography Test Page](/docs/development/icon-test) which demonstrates various typography components in action.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗