Skip to main content
Glama

parse_pico

Validate PICO elements from a clinical question and output a search pipeline YAML for PubMed.

Instructions

Validate agent-provided PICO elements and return a runnable search plan.

The agent, not this MCP server, extracts P/I/C/O from the user's natural language question. When only description is provided, this tool returns the schema the agent should fill and asks the agent to call this tool again with structured elements.

Args: description: Original clinical question for provenance. p: Population / patient group extracted by the agent. i: Intervention / exposure / index test extracted by the agent. c: Comparator extracted by the agent, optional. o: Outcome extracted by the agent, recommended. p_query/i_query/c_query/o_query: Optional expanded PubMed-ready query fragments. When present, the PICO pipeline uses these for search while preserving the human-readable P/I/C/O labels. question_type: therapy, diagnosis, prognosis, or etiology. Inferred heuristically when omitted. profile: Search profile for the PICO template, default balanced. sources: Comma-separated sources for the pipeline. limit: Final result limit for the pipeline.

Returns: JSON containing validation, PICO schema, query plan, and pipeline YAML that can be passed to unified_search(pipeline=...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
pNo
iNo
cNo
oNo
p_queryNo
i_queryNo
c_queryNo
o_queryNo
question_typeNo
profileNobalanced
sourcesNopubmed
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the two-phase call pattern, that question_type is inferred heuristically, and that p_query/i_query etc. are used for search while preserving labels. Mentions return includes validation, schema, query plan, and pipeline YAML.

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?

Well-structured with a clear summary sentence, a workflow paragraph, and an Args block. Could be slightly more concise but every sentence adds value.

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

Completeness4/5

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

Given 13 parameters and a multi-step workflow, the description covers the purpose, workflow, parameters, and return value. Output schema exists (not shown) but description mentions JSON structure, making it sufficiently complete.

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 description coverage is 0%, but description adds detailed explanations for each parameter in the Args section, e.g., p_query: 'Optional expanded PubMed-ready query fragments...'. This compensates fully for the lack of schema descriptions.

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 it validates agent-provided PICO elements and returns a runnable search plan. It specifies the tool's role in the PICO extraction and search pipeline, distinguishing it from sibling tools like generate_search_queries and unified_search.

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?

Explicitly describes the two-phase usage: first call with only description to get schema, then with structured elements. States that the agent, not the server, extracts P/E/C/O. Does not explicitly mention when not to use, but usage context is clear.

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/u9401066/pubmed-search-mcp'

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