Skip to main content
Glama

nworks_drive_list

Retrieve file and folder listings from NAVER WORKS Drive. Use this tool to view directory contents when users request 'show my files' or 'list drive items'. Requires OAuth authentication with file.read scope.

Instructions

NAVER WORKS 드라이브의 파일/폴더 목록을 조회합니다. '드라이브 파일 보여줘', '내 파일 목록' 등의 요청에 사용. User OAuth 인증 필요 (file.read scope)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNo대상 사용자 ID (미지정 시 me)
folderIdNo폴더 ID (미지정 시 루트)
countNo페이지당 항목 수 (기본: 20, 최대: 200)
cursorNo페이지네이션 커서

Implementation Reference

  • The core implementation of the drive file listing logic.
    export async function listFiles(
      userId = "me",
      folderId?: string,
      count = 20,
      cursor?: string,
      profile = "default"
    ): Promise<FileListResult> {
      const base = `${BASE_URL}/users/${sanitizePathSegment(userId)}/drive/files`;
      const path = folderId ? `${base}/${sanitizePathSegment(folderId)}/children` : base;
    
      const params = new URLSearchParams();
      params.set("count", String(count));
      if (cursor) params.set("cursor", cursor);
    
      const url = `${path}?${params.toString()}`;
    
      if (process.env["NWORKS_VERBOSE"] === "1") {
        console.error(`[nworks] GET ${url}`);
      }
    
      const res = await authedFetch(url, { method: "GET" }, profile);
    
      if (!res.ok) return handleError(res);
    
      const data = (await res.json()) as FileListResult;
      return { files: data.files ?? [], responseMetaData: data.responseMetaData };
    }
  • MCP tool registration for nworks_drive_list, which calls the driveApi.listFiles handler.
    server.tool(
      "nworks_drive_list",
      "NAVER WORKS 드라이브의 파일/폴더 목록을 조회합니다. '드라이브 파일 보여줘', '내 파일 목록' 등의 요청에 사용. User OAuth 인증 필요 (file.read scope)",
      {
        userId: z.string().optional().describe("대상 사용자 ID (미지정 시 me)"),
        folderId: z.string().optional().describe("폴더 ID (미지정 시 루트)"),
        count: z.number().optional().describe("페이지당 항목 수 (기본: 20, 최대: 200)"),
        cursor: z.string().optional().describe("페이지네이션 커서"),
      },
      async ({ userId, folderId, count, cursor }) => {
        try {
          const result = await driveApi.listFiles(
            userId ?? "me",
            folderId,
            count ?? 20,
            cursor
          );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yjcho9317/nworks'

If you have feedback or need assistance with the MCP directory API, please join our Discord server