Skip to content

Commit c8c59be

Browse files
authored
Merge pull request #163 from cloudflare/fix-#146
Fix list autorags tool
2 parents 31c40f4 + 86eca61 commit c8c59be

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/autorag/src/tools/autorag.tools.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Cloudflare from 'cloudflare'
1+
import { V4PagePaginationArray } from 'cloudflare/src/pagination.js'
22
import { z } from 'zod'
33

44
import { getCloudflareClient } from '@repo/mcp-common/src/cloudflare-api'
@@ -7,8 +7,6 @@ import { pageParam, perPageParam } from '../types'
77

88
import type { AutoRAGMCP } from '../autorag.app'
99

10-
import V4PagePaginationArray = Cloudflare.V4PagePaginationArray
11-
1210
export function registerAutoRAGTools(agent: AutoRAGMCP) {
1311
agent.server.tool(
1412
'list_rags',
@@ -33,6 +31,7 @@ export function registerAutoRAGTools(agent: AutoRAGMCP) {
3331
const client = getCloudflareClient(agent.props.accessToken)
3432
const r = (await client.getAPIList(
3533
`/accounts/${accountId}/autorag/rags`,
34+
// @ts-ignore
3635
V4PagePaginationArray,
3736
{ query: { page: params.page, per_page: params.per_page } }
3837
)) as unknown as {

0 commit comments

Comments
 (0)