Skip to main content
Glama
zouxy111

literature-agent-mcp

by zouxy111

literature-agent-mcp

MCP server that exposes the local biomedical literature pipeline in:

  • /Users/zouxingyu/Desktop/Codex工作区/literature-agent

It wraps the existing five-step CLI workflow as MCP tools so OpenClaw / Codex / Claude Code / other MCP clients can call it as a standard server.

Tools

  • plan_query

  • search_and_merge

  • download_fulltexts

  • convert_and_index

  • write_draft

  • run_pipeline

Related MCP server: PubMed Advanced MCP Server

Default assumptions

  • Biomedical / pathology domain

  • Legal open-access retrieval only

  • No paywall bypass

  • Local literature-agent project already exists

Local setup

cd /tmp/mcp_repo_zouxy111
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .

Run server

source .venv/bin/activate
literature-agent-mcp

Environment variables

  • LITERATURE_AGENT_ROOT: override the default project root
    Default: /Users/zouxingyu/Desktop/Codex工作区/literature-agent

  • LITERATURE_AGENT_PYTHON: override the interpreter used to call the backend
    Default: <root>/.venv/bin/python, fallback python

Example MCP config

{
  "mcpServers": {
    "literature-agent": {
      "command": "/tmp/mcp_repo_zouxy111/.venv/bin/literature-agent-mcp",
      "env": {
        "LITERATURE_AGENT_ROOT": "/Users/zouxingyu/Desktop/Codex工作区/literature-agent"
      }
    }
  }
}

Backend outputs

For a given task_id, outputs are written under:

<literature-agent>/work/<task_id>/

Typical structure:

  • query_plan.json

  • search/master_results.jsonl

  • corpus/

  • draft/

Available Tools

6 tools
convert_and_indexC

Convert downloaded PDF/HTML to notes/text and index the corpus.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'index the corpus' implying a write operation, but fails to clarify idempotency, whether indexing is additive or destructive, authentication requirements, or what 'the corpus' refers to. The existence of an output schema is not acknowledged.

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?

The description is a single, front-loaded sentence with no redundant words. While efficient, it may be overly concise given the lack of schema documentation and annotations, though this concerns completeness rather than conciseness per se.

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?

Despite having an output schema (covering return values), the description is incomplete due to zero parameter documentation and lack of workflow context. For a tool handling PDF conversion and corpus indexing—operations involving external resources and state management—the single-sentence description leaves critical gaps the agent must guess.

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

Parameters1/5

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

The input schema has 0% description coverage for the single required parameter 'task_id'. The description completely fails to compensate for this gap—it does not mention 'task_id', explain that it references a prior download batch, or describe expected values (UUID? string format?).

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 tool converts 'downloaded PDF/HTML to notes/text and index the corpus,' providing specific verbs (convert, index) and resources. However, it doesn't explicitly differentiate from sibling 'download_fulltexts' (which likely produces the input for this tool), leaving the workflow relationship implicit.

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 explicit guidance on when to use this tool versus alternatives, nor does it state prerequisites. While 'downloaded' implies prior execution of 'download_fulltexts', the agent must infer this workflow dependency rather than being told explicitly.

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

download_fulltextsC

Download open-access full texts and write manual follow-up list.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries full disclosure burden. While 'write' implies mutation/file system effects, it lacks critical details: failure modes when texts aren't open-access, rate limits, storage locations, or whether the follow-up list is a file, database entry, or return value.

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?

Extremely concise (9 words) and front-loaded with the primary action. However, the 'write manual follow-up list' phrase is grammatically ambiguous (is this a side effect, output, or separate tool function?), slightly diminishing 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?

Insufficient for a pipeline tool with side effects. Despite having an output schema (relieving return-value description duties), it omits crucial context: task_id provenance, follow-up list format/location, and open-access handling behavior. Annotations are absent, increasing the description's disclosure burden.

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

Parameters2/5

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

Schema has 0% description coverage for the sole required parameter (task_id). The description fails to compensate by explaining what task_id represents, its format, or that it references a previous pipeline execution (likely from plan_query or run_pipeline).

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?

States specific action (download) and resource (open-access full texts). The 'write manual follow-up list' clause hints at handling non-open-access items, providing useful scope context. However, it does not explicitly differentiate from sibling search_and_merge or convert_and_index tools.

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?

Provides no guidance on when to use this tool versus alternatives like search_and_merge. Fails to mention that task_id likely comes from prior pipeline steps (plan_query/run_pipeline), leaving agents unaware of workflow prerequisites.

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

plan_queryC

Generate a query plan JSON for a biomedical/pathology literature task.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYes
task_idYes
questionNo
year_startNo
year_endNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior2/5

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

With no annotations provided, the description carries full disclosure burden but only specifies the JSON output format. It lacks critical details on side effects (whether plans persist), execution duration, or the semantic structure of the generated query plan.

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?

Single sentence efficiently conveys core purpose without redundancy or filler. However, extreme brevity leaves insufficient room for necessary parameter documentation given the complete lack of schema descriptions.

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?

Inadequate for a 5-parameter tool with zero schema documentation. While the existence of an output schema excuses return value explanation, the complete absence of parameter guidance and behavioral context creates significant operational gaps for agent invocation.

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

Parameters2/5

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

Schema description coverage is 0%, requiring the description to compensate, but it only implicitly contextualizes the topic parameter via domain mention. It completely fails to explain task_id semantics, date filtering behavior for year_start/year_end, or the optional nature of question and year_end.

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?

Generate a query plan JSON clearly identifies the action and deliverable format, while 'biomedical/pathology literature' appropriately constrains the domain. It implicitly distinguishes from execution-oriented siblings like search_and_merge by emphasizing planning, though explicit differentiation is absent.

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 explicit guidance on when to invoke this tool versus alternatives like search_and_merge or run_pipeline. The description fails to indicate this is typically the first step in a multi-stage pipeline, leaving agents without workflow context.

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

run_pipelineC

Run the complete literature pipeline: plan, search, download, index, and draft.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYes
task_idYes
questionNo
year_startNo
year_endNo
per_queryNo
modeNoreview

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. Listing the five pipeline stages provides useful behavioral context about the operation sequence, but it lacks critical safety disclosures (destructive potential, idempotency, state mutation) or performance characteristics expected for a complex multi-step process.

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?

The single sentence is tightly constructed and front-loaded with the action. However, given the high complexity (7 parameters, multi-stage pipeline), the extreme brevity contributes to underspecification rather than efficient communication.

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?

For a tool with 7 parameters, zero schema coverage, no annotations, and complex multi-step behavior, the description is insufficient. While an output schema exists (reducing the need for return value explanation), the complete absence of input documentation and minimal behavioral context leaves significant gaps.

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

Parameters1/5

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

Schema description coverage is 0%, requiring the description to compensate for 7 undocumented parameters (topic, task_id, question, year_start, year_end, per_query, mode). The description fails to mention any parameters or their semantics, leaving critical inputs like 'task_id' and 'mode' completely unexplained.

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 uses a specific verb ('Run') and resource ('literature pipeline'), clearly delineating the scope via the colon-separated steps (plan, search, download, index, draft). These steps map directly to the sibling tools (plan_query, search_and_merge, download_fulltexts, convert_and_index, write_draft), effectively distinguishing this orchestrator from individual atomic operations.

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?

While the word 'complete' implies this tool runs the full workflow versus individual steps, there is no explicit guidance on when to use this monolithic pipeline versus the granular sibling tools, nor are prerequisites (e.g., valid task_id format) mentioned.

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

search_and_mergeB

Run multi-source search and merge using the existing query plan.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes
per_queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
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 fails to explain what 'merge' means (deduplication, concatenation, ranking), whether the operation is idempotent, or what side effects occur. Only the basic action type is conveyed.

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?

The single sentence is front-loaded and efficient, with no redundant words. However, given the lack of annotations and schema descriptions, the description may be overly terse rather than appropriately sized for the information deficit.

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?

While the core purpose is stated and an output schema exists (reducing the need for return value description), the description inadequately covers the two parameters given 0% schema coverage. It meets minimum viability but leaves significant gaps in operational context.

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?

With 0% schema description coverage, the description partially compensates by implying 'task_id' references the 'existing query plan'. However, 'per_query' is completely undocumented, and the description does not specify data types, constraints, or defaults beyond what the schema structurally implies.

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 uses specific verbs ('Run', 'search', 'merge') and identifies the resource ('multi-source', 'query plan'). It implicitly distinguishes from sibling 'plan_query' by specifying 'existing query plan' versus creating one, though it could be more explicit about what 'merge' entails.

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

Usage Guidelines3/5

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

The phrase 'using the existing query plan' implies a workflow sequence (use after creating a plan) but does not explicitly state prerequisites, alternatives, or when NOT to use the tool. The agent must infer the dependency on 'plan_query'.

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

write_draftC

Generate an outline and first draft scaffold from the local corpus.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes
topicYes
modeNoreview

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.7/5.0
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 discloses minimal behavioral traits. While 'generate' implies creation and 'scaffold' suggests structural output, it fails to clarify idempotency, side effects (disk writes vs. memory), or what happens if the task_id already exists.

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?

The single-sentence description is efficiently front-loaded with no redundant words. However, given the lack of schema documentation and annotations, the extreme brevity contributes to underspecification rather than effective communication.

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?

Despite having an output schema (reducing the need to describe returns), the description is inadequate for a 3-parameter tool with zero schema coverage. It omits critical context about parameter meanings, corpus prerequisites, and mutation behavior that the structured fields cannot provide.

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

Parameters2/5

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

Schema description coverage is 0%, requiring the description to compensate, yet it mentions none of the three parameters (task_id, topic, mode). The agent receives no guidance on parameter semantics, formats, or the default 'review' mode value from the description text.

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 action (generate) and outputs (outline and first draft scaffold) from a specific source (local corpus). However, it does not explicitly differentiate from sibling tools like 'run_pipeline' or 'plan_query' that might also involve content generation.

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 explicit guidance on when to use this tool versus siblings, prerequisites (e.g., whether the corpus must be indexed first via convert_and_index), or when to avoid it. The agent must infer usage from the tool name alone.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedconvert_and_index
    • First observeddownload_fulltexts
    • First observedplan_query
    • First observedrun_pipeline
    • First observedsearch_and_merge
    • First observedwrite_draft

TDQS

C2.8/5.0

Scored across 6 tools

Disambiguation2/5

The run_pipeline tool explicitly subsumes the functionality of most other tools (plan, search, download, index, draft), creating significant ambiguity about when agents should use atomic steps versus the monolithic pipeline. Boundaries between individual tools are clear, but their relationship to the pipeline tool is undefined.

Naming Consistency3/5

While all tools use snake_case, the naming pattern inconsistently mixes simple verb_noun constructions (plan_query, write_draft) with compound verb_and_verb patterns (convert_and_index, search_and_merge). This deviation from a single convention reduces predictability despite remaining readable.

Tool Count4/5

Six tools falls within the ideal range for a literature research domain and covers the major workflow stages. However, functional redundancy between the pipeline orchestrator and individual step tools suggests slight scope overlap, preventing a perfect score.

Completeness3/5

The set covers core creation operations (planning, downloading, indexing, drafting) but lacks complementary read/update/delete operations for managing the generated artifacts. Notable gaps include querying the indexed corpus, retrieving specific papers, or updating drafts after creation.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers