Skip to main content
Glama
kinmeic

Stock MCP Server

by kinmeic

position_list

Retrieve all stock position records from the Stock MCP Server to track and manage your investment portfolio across multiple markets.

Instructions

获取所有持仓记录

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler for position_list that calls position.getAllPositions() and returns the results as JSON
    if (name === 'position_list') {
      const result = position.getAllPositions();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core implementation of getAllPositions() function that loads and returns all position records
    export function getAllPositions(): Position[] {
      return loadPositions();
    }
  • Helper function loadPositions() that reads position data from positions.json file
    function loadPositions(): Position[] {
      try {
        if (fs.existsSync(DATA_FILE)) {
          const data = fs.readFileSync(DATA_FILE, 'utf-8');
          return JSON.parse(data);
        }
      } catch (error) {
        console.error('Failed to load positions:', error);
      }
      return [];
    }
  • Position interface schema defining the structure of position data
    export interface Position {
      code: string;
      name: string;
      quantity: number;
      costPrice: number;
      currency: string;
      market: Market;
      createdAt: string;
      updatedAt: string;
    }
  • src/index.ts:185-191 (registration)
    Tool registration for position_list in the ListToolsRequestSchema handler
      name: 'position_list',
      description: '获取所有持仓记录',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'gets all position records', implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, returns paginated results, includes metadata, or has rate limits. For a list tool with zero annotation coverage, this is a significant gap.

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 phrase ('获取所有持仓记录') that directly states the purpose without any waste. It's appropriately sized and front-loaded, with every word contributing to clarity.

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 the complexity (a list operation with sibling tools), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'all' entails (e.g., scope, limits), how results are structured, or how it fits with other tools like 'position_get'. For a tool in a family with multiple position-related siblings, more context is needed.

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?

The input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description doesn't add parameter details, but that's unnecessary here. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.

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

Purpose3/5

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

The description '获取所有持仓记录' (Get all position records) states a clear verb ('获取' - get) and resource ('持仓记录' - position records), but it's somewhat vague about scope and doesn't distinguish from sibling tools like 'position_get' (which presumably gets a specific position) or 'watch_list' (which lists watch items). It's functional but lacks specificity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that this lists all positions without filtering (unlike 'position_get' for specific ones) or how it differs from 'watch_list'. There's no context on prerequisites, timing, or 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/kinmeic/stock-mcp'

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