Skip to main content
Glama
paperinvest

Paper MCP Server

by paperinvest

get_account_portfolios

Retrieve all portfolios linked to a specific account ID using the Paper MCP Server, enabling streamlined account management and portfolio tracking.

Instructions

Get all portfolios for an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesAccount ID

Implementation Reference

  • The handler logic for the 'get_account_portfolios' tool. It makes an authenticated GET request to the API endpoint `/accounts/${accountId}/portfolios` to retrieve all portfolios for the specified account.
    case 'get_account_portfolios':
      response = await api.get(`/accounts/${args.accountId}/portfolios`);
      break;
  • Input schema validation for the tool, requiring an 'accountId' string.
    inputSchema: {
      type: 'object',
      properties: {
        accountId: { type: 'string', description: 'Account ID' }
      },
      required: ['accountId']
    }
  • src/index.ts:132-142 (registration)
    Tool registration in the tools array, including name, description, and schema. This is returned by the ListTools handler.
    {
      name: 'get_account_portfolios',
      description: 'Get all portfolios for an account',
      inputSchema: {
        type: 'object',
        properties: {
          accountId: { type: 'string', description: 'Account ID' }
        },
        required: ['accountId']
      }
    },
  • Axios request interceptor that adds JWT Bearer token authentication to all API calls, using getAuthToken function and API_KEY env var.
    api.interceptors.request.use(async (config) => {
      const token = await getAuthToken(API_KEY!);
      config.headers.Authorization = `Bearer ${token}`;
      return config;
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits. It does not mention if this is a read-only operation, potential rate limits, authentication needs, return format, or pagination, leaving significant gaps for a tool that likely interacts with financial data.

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?

The description is a single, efficient sentence with zero waste, front-loading the core action. It is appropriately sized for a simple tool, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations, no output schema, and a simple but potentially critical financial tool, the description is incomplete. It lacks details on return values, error handling, or operational context, which are essential for effective use in this domain.

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

Parameters3/5

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

The input schema has 100% description coverage, with 'accountId' documented as 'Account ID'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage without compensating further.

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

Purpose4/5

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

The description clearly states the verb 'Get' and resource 'all portfolios for an account', making the purpose unambiguous. However, it does not differentiate from sibling tools like 'get_portfolio' (singular) or 'get_portfolio_activities', which might retrieve related but different data, so it misses full sibling distinction.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as 'get_portfolio' (which might fetch a single portfolio) or other portfolio-related tools. The description lacks context, prerequisites, or exclusions, offering minimal usage direction.

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

Related 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/paperinvest/mcp-server'

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