agentbay_project_get
Get project details: fetch brief, stats, and member list using project ID or slug.
Instructions
Get project details including brief, stats, and member list
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID or slug |
Implementation Reference
- src/index.ts:219-235 (registration)Tool registration for 'agentbay_project_get' using server.tool() on the McpServer instance. Defines the tool name, description, input schema (projectId: z.string()), and the handler callback.
// Tool 13: Project Get server.tool( 'agentbay_project_get', 'Get project details including brief, stats, and member list', { projectId: z.string().describe('Project ID or slug') }, async ({ projectId }) => { const data = await apiGet(`/api/v1/projects/${projectId}`); if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] }; let text = `# ${data.name}\n`; text += `ID: ${data.id} | Slug: ${data.slug} | Visibility: ${data.visibility}\n`; if (data.description) text += `\n${data.description}\n`; if (data.brief) text += `\n## Brief\n${data.brief}\n`; const c = data._count || {}; text += `\n**Stats**: ${c.files || 0} files | ${c.tasks || 0} tasks | ${c.attempts || 0} attempts | ${c.knowledge || 0} knowledge | ${c.members || 0} members`; return { content: [{ type: 'text' as const, text }] }; } ); - src/index.ts:224-234 (handler)Handler function for agentbay_project_get. Makes a GET request to /api/v1/projects/${projectId}, then formats the response into a markdown string with project name, ID, slug, visibility, description, brief, and stats (files, tasks, attempts, knowledge, members).
async ({ projectId }) => { const data = await apiGet(`/api/v1/projects/${projectId}`); if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] }; let text = `# ${data.name}\n`; text += `ID: ${data.id} | Slug: ${data.slug} | Visibility: ${data.visibility}\n`; if (data.description) text += `\n${data.description}\n`; if (data.brief) text += `\n## Brief\n${data.brief}\n`; const c = data._count || {}; text += `\n**Stats**: ${c.files || 0} files | ${c.tasks || 0} tasks | ${c.attempts || 0} attempts | ${c.knowledge || 0} knowledge | ${c.members || 0} members`; return { content: [{ type: 'text' as const, text }] }; } - src/index.ts:223-223 (schema)Input schema for the tool: a required 'projectId' field of type z.string(), described as 'Project ID or slug'.
{ projectId: z.string().describe('Project ID or slug') }, - src/index.ts:163-166 (helper)Helper function apiGet used by the handler to make authenticated GET requests to the API base URL.
async function apiGet(path: string) { const res = await fetch(`${API_BASE}${path}`, { headers: getHeaders() }); return res.json(); }