get_component_source

Get source file location (file, line, column) for a component. Use selector or uid from take_snapshot.

Server React Native @ohah/react-native-mcp-server
Category Read
Risk class Low
Parameters 00 required

What get_component_source does on React Native

AI agents call get_component_source to retrieve information from React Native without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

Why get_component_source needs a policy

This tool performs a pure read/query operation returning source code location information. It has no side effects, does not modify state, execute code, or trigger external operations. The severity is low because the information returned (file locations and line numbers) is non-sensitive metadata that does not expose data access or control risks.

From the tool's definition Tool description states it 'Get[s] source file location' with no modification or execution capability. It retrieves metadata about component location (file, line, column) based on a selector or uid parameter.

Questions about get_component_source

What does the get_component_source tool do? +

Get source file location (file, line, column) for a component. Use selector or uid from take_snapshot. It is categorised as a Read tool in the React Native MCP Server, which means it retrieves data without modifying state.

How do I enforce a policy on get_component_source? +

Register the React Native MCP server in PolicyLayer and add a rule for get_component_source: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches React Native. Nothing to install.

What risk level is get_component_source? +

get_component_source is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit get_component_source? +

Yes. Add a rate_limit block to the get_component_source rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block get_component_source completely? +

Set action: deny in the PolicyLayer policy for get_component_source. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides get_component_source? +

get_component_source is provided by the React Native MCP server (@ohah/react-native-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.