Skip to content

Create a Markdown TOC generator as an agent tool #8

@kanweiwei

Description

@kanweiwei

CreatorWeave has 30+ agent tools. A tool that generates a Table of Contents from a Markdown file would be useful for document workflows.

What to do:

  1. Study an existing simple tool: web/src/agent/tools/ls.tool.ts
  2. Create web/src/agent/tools/markdown-toc.tool.ts:
    • Accept a file path or content as input
    • Parse markdown headings (## Title, ### Subtitle, etc.)
    • Generate a linked TOC
    • Return the TOC as a string
  3. Register the tool in the tool registry
  4. Add tests in web/src/agent/tools/__tests__/markdown-toc.tool.test.ts

Skills needed: TypeScript, Markdown parsing, understanding of the tool system

Reference:

  • web/src/agent/tools/ls.tool.ts
  • web/src/agent/tools/tool-types.ts

Estimated time: 2-3 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions