Skip to main content
Glama

Get Community Strategy Code

get_strategy_code
Read-onlyIdempotent

Get the actual Python code behind a community leaderboard strategy.

Use after `browse_community`: pass an entry's `id` here to read its real
`feature_engineering()` + `strategy_config()` source so the user can
inspect or tweak it. To deploy it unchanged, pass the same id to
`one_shot` as `community_id`. Read-only, no signup needed.

Args:
  community_id: The `id` of a community entry (from `browse_community`).

Returns:
  dict with: id, title, username, description, symbol, timeframe,
  metrics {total_ret, win_rate, profit_factor, n_trades, mdd, sharpe_strat},
  and `code` (the full Python source). SHOW the code to the user, and offer
  to deploy it via one_shot(community_id=...) or tweak it first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
community_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already provide readOnlyHint, openWorldHint, idempotentHint. Description adds context: no signup needed, returns specific fields including code, and instructs to show the code and offer to deploy. No contradiction with annotations.

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

Conciseness4/5

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

Description is efficient, front-loaded with main action, then usage context, parameter, and returns. Slightly verbose with the 'SHOW the code...' instruction, but still concise overall.

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

Completeness5/5

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

Given existence of output schema, description explains return fields in dict and workflow (use after browse_community, show code, offer to deploy). Complete for agent decision-making.

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

Parameters5/5

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

Schema has 0% description coverage, but description fully explains the parameter: 'community_id: The `id` of a community entry (from `browse_community`).' This provides clear meaning and source, fully compensating for schema lack.

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?

Description clearly states 'Get the actual Python code behind a community leaderboard strategy.', using specific verb 'Get' and resource 'Python code'. It distinguishes from siblings by mentioning use after `browse_community` and alternative deployment via `one_shot`.

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

Usage Guidelines5/5

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

Explicitly states when to use ('Use after `browse_community`') and when not to use or alternative ('To deploy it unchanged, pass the same id to `one_shot`'). Also clarifies read-only, no signup needed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources