Skip to main content
Glama

agentbay_brain_import

Import operational knowledge into your Brain using markdown (split by ## sections) or JSONL (one entry per line) to store structured knowledge.

Instructions

Import operational knowledge into your Brain. Accepts markdown (splits by ## headers) or JSONL (one entry per line).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesBrain project ID (from brain_setup)
formatYesInput format
contentYesThe knowledge content to import

Implementation Reference

  • src/index.ts:996-1020 (registration)
    Registration of the 'agentbay_brain_import' tool using server.tool() with name 'agentbay_brain_import' and description 'Import operational knowledge into your Brain.'
    // Tool 36: Brain Import
    server.tool(
      'agentbay_brain_import',
      'Import operational knowledge into your Brain. Accepts markdown (splits by ## headers) or JSONL (one entry per line).',
      {
        projectId: z.string().describe('Brain project ID (from brain_setup)'),
        format: z.enum(['markdown', 'jsonl']).describe('Input format'),
        content: z.string().describe('The knowledge content to import'),
      },
      async ({ projectId: pid, format: fmt, content: cnt }) => {
        const data = await apiPost('/api/v1/brain/import', { projectId: pid, format: fmt, content: cnt });
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
    
        let summary = `Imported: ${data.imported} new, ${data.deduplicated} deduped`;
        if (data.poisonBlocked > 0) summary += `, ${data.poisonBlocked} blocked (poison)`;
        if (data.errors > 0) summary += `, ${data.errors} errors`;
        summary += ` (${data.total} total)`;
    
        if (data.entries?.length) {
          summary += '\n\nEntries:\n' + data.entries.map((e: any) => `  ${e.status}: ${e.title}`).join('\n');
        }
    
        return { content: [{ type: 'text' as const, text: summary }] };
      }
    );
  • Input schema for agentbay_brain_import: projectId (string), format (enum markdown|jsonl), content (string)
    {
      projectId: z.string().describe('Brain project ID (from brain_setup)'),
      format: z.enum(['markdown', 'jsonl']).describe('Input format'),
      content: z.string().describe('The knowledge content to import'),
    },
  • Handler for agentbay_brain_import: posts to /api/v1/brain/import with projectId, format, content; returns import summary with counts of imported, deduplicated, poison-blocked entries.
      async ({ projectId: pid, format: fmt, content: cnt }) => {
        const data = await apiPost('/api/v1/brain/import', { projectId: pid, format: fmt, content: cnt });
        if (data.error) return { content: [{ type: 'text' as const, text: `Error: ${data.error}` }] };
    
        let summary = `Imported: ${data.imported} new, ${data.deduplicated} deduped`;
        if (data.poisonBlocked > 0) summary += `, ${data.poisonBlocked} blocked (poison)`;
        if (data.errors > 0) summary += `, ${data.errors} errors`;
        summary += ` (${data.total} total)`;
    
        if (data.entries?.length) {
          summary += '\n\nEntries:\n' + data.entries.map((e: any) => `  ${e.status}: ${e.title}`).join('\n');
        }
    
        return { content: [{ type: 'text' as const, text: summary }] };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose all behavioral traits. It mentions splitting behavior for markdown (by ## headers) and JSONL (one entry per line), but omits important details like authorization requirements, overwrite vs append behavior, error handling, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences front-loaded with the core purpose, followed by specific format details. No redundant or unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers input format behavior adequately but lacks mention of output/return value, duplicate handling, success indicators, or potential errors. Given no output schema, more context on expected outcomes would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all three parameters with descriptions. The description adds value by explaining how the 'content' parameter is interpreted based on the 'format' enum, e.g., splitting by headers for markdown, which is not in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the verb 'import', resource 'operational knowledge into your Brain', and specifies two supported formats (markdown, JSONL). Differentiates from siblings like agentbay_knowledge_record and agentbay_knowledge_export.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for importing bulk knowledge with format constraints, but does not explicitly state when to use versus alternative tools (e.g., agentbay_knowledge_record for single entries) or provide any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/thomasjumper/agentbay-mcp'

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