Skip to main content
Glama

convert_dtype

Convert column types to int, float, str, category, datetime, or bool to fix incorrect types like numeric values stored as strings. Apply before statistical analysis or encoding.

Instructions

Convert column types. Dtypes: 'int', 'float', 'str', 'category', 'datetime', 'bool'. Fix incorrect types (numeric stored as string). Do this BEFORE statistical analysis or encoding. Example: convert_dtype(columns=["age","score"], dtype="float")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dtypeYes
columnsYes
df_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description must carry the full behavioral disclosure burden. It lacks critical details such as whether the operation mutates the DataFrame in place or returns a new one, how errors are handled for invalid conversions, and any side effects on other columns or the current dataframe context.

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 compact and front-loaded with the core action, followed by supported types, a use-case tip, and a concrete example. Every sentence adds value without redundancy.

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?

The tool is relatively simple, and an output schema exists, so return values may be covered elsewhere. However, the description lacks behavioral details (e.g., in-place vs. return, error handling) and does not clarify the df_name parameter, leaving some contextual gaps for an agent.

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 0%, so the description must compensate. It does list valid dtype values and gives an example with columns and dtype, but it omits the df_name parameter entirely and does not explain the expected format for columns beyond the example.

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?

The description clearly states the tool's function ('Convert column types') and lists supported dtypes. It also distinguishes itself from siblings by framing the operation as type conversion rather than selection or encoding, and provides a concrete example.

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 gives explicit timing guidance ('Do this BEFORE statistical analysis or encoding') and identifies a common use case (fixing numeric stored as string). However, it does not mention when not to use the tool or point to alternative sibling tools.

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/AstyanM/mcp-data-science'

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