Skip to main content
Glama
SuxyEE
by SuxyEE

list_logstores

Discover available logstores within an Alibaba Cloud SLS project to identify data sources before querying logs. Lists all logstores by project and region.

Instructions

List all logstores within an SLS project. Use this to discover available logstores before querying logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesSLS project name
regionNoAlibaba Cloud region ID where the project resides, e.g. cn-hangzhou, cn-shenzhen. Defaults to SLS_REGION env variable.

Implementation Reference

  • The handler function that executes the logic for listing logstores by calling the SLS client.
    export async function handleListLogStores(input: ListLogStoresInput): Promise<string> {
      const logstores = await listLogStores(input.project, input.region);
    
      if (logstores.length === 0) {
        return `No logstores found in project: ${input.project}`;
      }
    
      const lines = logstores.map((l) => `- **${l.logstoreName}**`);
    
      return [
        `Found **${logstores.length}** logstores in project **${input.project}**:\n`,
        lines.join('\n'),
        '\nUse `query_logs` to query log data from a logstore.',
      ].join('\n');
    }
  • Input validation schema for the list_logstores tool using Zod.
    export const listLogStoresSchema = z.object({
      project: z.string().describe('SLS project name'),
      region: z
        .string()
        .optional()
        .describe('Alibaba Cloud region ID where the project resides, e.g. cn-hangzhou, cn-shenzhen. Defaults to SLS_REGION env variable.'),
    });
  • src/index.ts:25-30 (registration)
    Registration of the 'list_logstores' tool in the main server configuration.
    {
      name: 'list_logstores',
      description:
        'List all logstores within an SLS project. Use this to discover available logstores before querying logs.',
      inputSchema: zodToJsonSchema(listLogStoresSchema) as Tool['inputSchema'],
    },
  • Tool call handler in the request dispatching logic.
    case 'list_logstores': {
      const input = listLogStoresSchema.parse(args);
      text = await handleListLogStores(input);
      break;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool lists logstores but doesn't cover critical aspects like whether it's a read-only operation, potential rate limits, authentication needs, or what the output format looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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 two concise sentences with zero waste—each sentence directly contributes to understanding the tool's purpose and usage. It's front-loaded with the core action and efficiently structured.

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?

Given the tool's low complexity (simple list operation) and high schema coverage, the description is somewhat complete but lacks output details (no output schema) and behavioral context. It covers the basics but doesn't fully compensate for the absence of annotations, leaving room for improvement in transparency.

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?

Schema description coverage is 100%, so the input schema already documents both parameters ('project' and 'region') adequately. The description adds no additional parameter semantics beyond what the schema provides, which meets the baseline for high schema coverage.

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 ('List') and resource ('all logstores within an SLS project'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_projects' beyond the resource scope, which prevents a perfect score.

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

Usage Guidelines4/5

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

The description provides clear context for usage ('to discover available logstores before querying logs'), which implicitly suggests when to use this tool. It doesn't explicitly state when not to use it or name alternatives, but the guidance is helpful and contextually relevant.

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/SuxyEE/aliyun-sls-mcp'

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